about summary refs log tree commit diff
path: root/src/liblog
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblog')
-rw-r--r--src/liblog/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 5981f87b4f2..a9c0501ee3e 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -302,8 +302,10 @@ pub fn mod_enabled(level: u32, module: &str) -> bool {
     enabled(level, module, unsafe { (*DIRECTIVES).iter() })
 }
 
-fn enabled(level: u32, module: &str,
-           iter: slice::Items<directive::LogDirective>) -> bool {
+fn enabled(level: u32,
+           module: &str,
+           iter: slice::Items<directive::LogDirective>)
+           -> bool {
     // Search for the longest match, the vector is assumed to be pre-sorted.
     for directive in iter.rev() {
         match directive.name {
@@ -322,7 +324,7 @@ fn enabled(level: u32, module: &str,
 /// `Once` primitive (and this function is called from that primitive).
 fn init() {
     let mut directives = match os::getenv("RUST_LOG") {
-        Some(spec) => directive::parse_logging_spec(spec),
+        Some(spec) => directive::parse_logging_spec(spec.as_slice()),
         None => Vec::new(),
     };