about summary refs log tree commit diff
path: root/src/liblog
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-25 20:40:27 +0000
committerbors <bors@rust-lang.org>2015-11-25 20:40:27 +0000
commitbef2af620187350a49c840099760f24acd21c861 (patch)
tree9deb3089b49e1c4d2b88792ccdcda017619a2c96 /src/liblog
parent1bb91be05f3e947364de8f6781124003ce2404ab (diff)
parent5fb6531903c4e425f48a859463bee20cfcc7f7c5 (diff)
Auto merge of #30017 - nrc:fmt, r=brson
Diffstat (limited to 'src/liblog')
-rw-r--r--src/liblog/directive.rs6
-rw-r--r--src/liblog/lib.rs8
2 files changed, 6 insertions, 8 deletions
diff --git a/src/liblog/directive.rs b/src/liblog/directive.rs
index 59e5b72d961..f1ebf167378 100644
--- a/src/liblog/directive.rs
+++ b/src/liblog/directive.rs
@@ -49,7 +49,7 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
     if let Some(m) = mods {
         for s in m.split(',') {
             if s.is_empty() {
-                continue
+                continue;
             }
             let mut parts = s.split('=');
             let (log_level, name) = match (parts.next(),
@@ -69,13 +69,13 @@ pub fn parse_logging_spec(spec: &str) -> (Vec<LogDirective>, Option<String>) {
                         Some(num) => (num, Some(part0)),
                         _ => {
                             println!("warning: invalid logging spec '{}', ignoring it", part1);
-                            continue
+                            continue;
                         }
                     }
                 }
                 _ => {
                     println!("warning: invalid logging spec '{}', ignoring it", s);
-                    continue
+                    continue;
                 }
             };
             dirs.push(LogDirective {
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 1de7ebfffde..850c5511dd5 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -296,7 +296,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) {
             n => {
                 let filter = mem::transmute::<_, &String>(n);
                 if !args.to_string().contains(filter) {
-                    return
+                    return;
                 }
             }
         }
@@ -375,7 +375,7 @@ pub fn mod_enabled(level: u32, module: &str) -> bool {
     // check being expanded manually in the logging macro, this function checks
     // the log level again.
     if level > unsafe { LOG_LEVEL } {
-        return false
+        return false;
     }
 
     // This assertion should never get tripped unless we're in an at_exit
@@ -393,9 +393,7 @@ fn enabled(level: u32, module: &str, iter: slice::Iter<directive::LogDirective>)
     for directive in iter.rev() {
         match directive.name {
             Some(ref name) if !module.starts_with(&name[..]) => {}
-            Some(..) | None => {
-                return level <= directive.level
-            }
+            Some(..) | None => return level <= directive.level,
         }
     }
     level <= DEFAULT_LOG_LEVEL