about summary refs log tree commit diff
path: root/src/libtime/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtime/lib.rs')
-rw-r--r--src/libtime/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index 7655ace0ecb..4e20c073ac5 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -1086,7 +1086,7 @@ pub fn strftime(format: &str, tm: &Tm) -> String {
         }
     }
 
-    str::from_utf8(buf.as_slice()).unwrap().to_string()
+    String::from_utf8(buf).unwrap()
 }
 
 #[cfg(test)]