Use if-let rather than map() in parse_logging_spec.
This commit is contained in:
parent
294ef5b158
commit
b38b9e101a
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
|
||||||
spec);
|
spec);
|
||||||
return (dirs, None);
|
return (dirs, None);
|
||||||
}
|
}
|
||||||
mods.map(|m| {
|
if let Some(m) = mods {
|
||||||
for s in m.split(',') {
|
for s in m.split(',') {
|
||||||
if s.is_empty() {
|
if s.is_empty() {
|
||||||
continue
|
continue
|
||||||
|
@ -83,7 +83,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
|
||||||
level: log_level,
|
level: log_level,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
(dirs, filter.map(str::to_owned))
|
(dirs, filter.map(str::to_owned))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue