From a8ed0e740b41eb6cc08151f33911d5c8a7866727 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 29 Oct 2018 23:17:13 +0100 Subject: parse_args(): Don't make `--audio` exclusive This argument is meant to be use in conjunction with the `--daemon` argument. What we had before was preventing audio from getting turned on if `--daemon` was passed first and vice versa. I just added to the existing if-else block without thinking. This makes the condition separate. --- src/config.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/config.rs b/src/config.rs index 4befa4c..5d37fab 100644 --- a/src/config.rs +++ b/src/config.rs @@ -83,12 +83,14 @@ pub fn parse_args<'a>(args: &[String], config: &'a mut Config) -> &'a mut Config return config; } + if matches.opt_present("audio") { + config.args.audio = true; + } + if matches.opt_present("r") { config.args.reload = true; } else if matches.opt_present("d") { config.args.daemon = true; - } else if matches.opt_present("audio") { - config.args.audio = true; } else if let Some(license_path) = matches.opt_str("license") { match CString::new(license_path) { Ok(str) => config.args.license = str.into_raw(), -- cgit v1.2.3