about summary refs log tree commit diff
path: root/src/liblog/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblog/lib.rs')
-rw-r--r--src/liblog/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index df85e89efd1..dd4291d6b51 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -282,7 +282,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) {
     // Test the literal string from args against the current filter, if there
     // is one.
     match unsafe { FILTER.as_ref() } {
-        Some(filter) if !filter.is_match(args.to_string()[]) => return,
+        Some(filter) if !filter.is_match(args.to_string().index(&FullRange)) => return,
         _ => {}
     }
 
@@ -377,7 +377,7 @@ fn enabled(level: u32,
     // Search for the longest match, the vector is assumed to be pre-sorted.
     for directive in iter.rev() {
         match directive.name {
-            Some(ref name) if !module.starts_with(name[]) => {},
+            Some(ref name) if !module.starts_with(name.index(&FullRange)) => {},
             Some(..) | None => {
                 return level <= directive.level
             }
@@ -392,7 +392,7 @@ fn enabled(level: u32,
 /// `Once` primitive (and this function is called from that primitive).
 fn init() {
     let (mut directives, filter) = match os::getenv("RUST_LOG") {
-        Some(spec) => directive::parse_logging_spec(spec[]),
+        Some(spec) => directive::parse_logging_spec(spec.index(&FullRange)),
         None => (Vec::new(), None),
     };