about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2015-10-14 14:16:48 +0200
committerMs2ger <Ms2ger@gmail.com>2015-10-14 14:16:48 +0200
commitb38b9e101a8bb60fb8c6b257b091c8d23d1b2017 (patch)
tree53b2766b7b97de148b13b6fb2400983e52048c85 /src
parent294ef5b158601b09e2a3ca49af124c63a9cf9528 (diff)
downloadrust-b38b9e101a8bb60fb8c6b257b091c8d23d1b2017.tar.gz
rust-b38b9e101a8bb60fb8c6b257b091c8d23d1b2017.zip
Use if-let rather than map() in parse_logging_spec.
Diffstat (limited to 'src')
-rw-r--r--src/liblog/directive.rs4
1 files changed, 2 insertions, 2 deletions
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<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))
 }