Simplify timeout arg

This commit is contained in:
Tyera Eulberg
2018-09-14 18:12:36 -06:00
committed by Tyera Eulberg
parent 0babee39a4
commit 10daa015c4

View File

@@ -24,12 +24,11 @@ pub fn parse_args(matches: &ArgMatches) -> Result<WalletConfig, Box<error::Error
} else {
socketaddr!("127.0.0.1:8001")
};
let timeout: Option<u64>;
if let Some(secs) = matches.value_of("timeout") {
timeout = Some(secs.to_string().parse().expect("integer"));
let timeout = if let Some(secs) = matches.value_of("timeout") {
Some(secs.to_string().parse().expect("integer"))
} else {
timeout = None;
}
None
};
let mut path = dirs::home_dir().expect("home directory");
let id_path = if matches.is_present("keypair") {