[porthole] clean up warnings

This commit is contained in:
soup 2025-04-12 00:05:08 -04:00
parent 6e7d7999da
commit 748d65cbfe
Signed by: soup
SSH key fingerprint: SHA256:GYxje8eQkJ6HZKzVWDdyOUF1TyDiprruGhE0Ym8qYDY
2 changed files with 3 additions and 5 deletions

View file

@ -10,7 +10,7 @@ fn main() {
&["configure", "server"] => server::configure(),
&["configure", "client"] => (),
&["start", "server"] => (),
&["start", "client", local_port] => (),
&["start", "client", _local_port] => (),
_ => {
println!("porthole <command>");
},

View file

@ -6,9 +6,7 @@ pub fn get_config_file_path(name: &str) -> IoResult<PathBuf> {
}
pub fn read_password(prompt: &str) -> IoResult<String> {
let mut stdin = std::io::stdin().lock();
let mut password = rpassword::prompt_password(prompt)?;
let password = rpassword::prompt_password(prompt)?;
Ok(password)
}
@ -34,7 +32,7 @@ where
loop {
print!("{}", prompt);
std::io::stdout().flush();
std::io::stdout().flush()?;
let mut s = String::new();
stdin.read_line(&mut s)?;
let parsed = match s.trim().parse() {