Use if-let rather than map() in parse_logging_spec.

This commit is contained in:
Ms2ger 2015-10-14 14:16:48 +02:00
parent 294ef5b158
commit b38b9e101a

View File

@ -46,7 +46,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
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<LogDirective>, Option<String>) {
level: log_level,
});
}
});
}
(dirs, filter.map(str::to_owned))
}