[porthole] clean up warnings
This commit is contained in:
parent
6e7d7999da
commit
748d65cbfe
|
|
@ -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>");
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue