From 10daa015c4d1a568886118ab8150c02173276628 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Fri, 14 Sep 2018 18:12:36 -0600 Subject: [PATCH] Simplify timeout arg --- src/bin/wallet.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bin/wallet.rs b/src/bin/wallet.rs index 8e496ff59e..078ccc6154 100644 --- a/src/bin/wallet.rs +++ b/src/bin/wallet.rs @@ -24,12 +24,11 @@ pub fn parse_args(matches: &ArgMatches) -> Result; - 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") {