Skip to content

Commit

Permalink
Use if-let rather than map() in parse_logging_spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Oct 14, 2015
1 parent 294ef5b commit b38b9e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liblog/directive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -83,7 +83,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
level: log_level,
});
}
});
}

(dirs, filter.map(str::to_owned))
}
Expand Down

0 comments on commit b38b9e1

Please sign in to comment.