Simplify timeout arg
This commit is contained in:
parent
0babee39a4
commit
10daa015c4
|
@ -24,12 +24,11 @@ pub fn parse_args(matches: &ArgMatches) -> Result<WalletConfig, Box<error::Error
|
||||||
} else {
|
} else {
|
||||||
socketaddr!("127.0.0.1:8001")
|
socketaddr!("127.0.0.1:8001")
|
||||||
};
|
};
|
||||||
let timeout: Option<u64>;
|
let timeout = if let Some(secs) = matches.value_of("timeout") {
|
||||||
if let Some(secs) = matches.value_of("timeout") {
|
Some(secs.to_string().parse().expect("integer"))
|
||||||
timeout = Some(secs.to_string().parse().expect("integer"));
|
|
||||||
} else {
|
} else {
|
||||||
timeout = None;
|
None
|
||||||
}
|
};
|
||||||
|
|
||||||
let mut path = dirs::home_dir().expect("home directory");
|
let mut path = dirs::home_dir().expect("home directory");
|
||||||
let id_path = if matches.is_present("keypair") {
|
let id_path = if matches.is_present("keypair") {
|
||||||
|
|
Loading…
Reference in New Issue