Fix command line parsing.

This commit is contained in:
Tim Bruijnzeels
2019-01-23 16:25:44 +01:00
parent 7c1d6b6513
commit dea1958d78
+1 -3
View File
@@ -370,7 +370,6 @@ impl Eq for PubClient { }
#[derive(Debug, Deserialize)]
pub struct Config {
name: String,
state_dir: PathBuf,
mode: RunMode
}
@@ -476,8 +475,7 @@ impl Config {
let state = m.value_of("state").unwrap(); // safe (required)
let state_dir = PathBuf::from(state);
let name = m.value_of("name").unwrap().to_string(); // safe (required)
Ok(Config {name, state_dir, mode})
Ok(Config { state_dir, mode})
}
}