diff --git a/src/liblog/directive.rs b/src/liblog/directive.rs index 12a5c131170..3958969cfca 100644 --- a/src/liblog/directive.rs +++ b/src/liblog/directive.rs @@ -46,7 +46,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec, Option) { spec); return (dirs, None); } - mods.map(|m| { + if let Some(m) = mods { for s in m.split(',') { if s.is_empty() { continue @@ -83,7 +83,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec, Option) { level: log_level, }); } - }); + } (dirs, filter.map(str::to_owned)) }