about summary refs log tree commit diff
path: root/src/libtime
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-03-05 15:28:08 -0800
committerHuon Wilson <dbau.pp+github@gmail.com>2014-03-21 23:37:21 +1100
commitaf79a5aa7da4f42fc0939a19f46fa73b894d6e9a (patch)
tree60c2e72eea83a8a4c70c76d6fe91967aeaf77632 /src/libtime
parent579eb2400b3cb5d9cf03a5c8792d63630489193a (diff)
test: Make manual changes to deal with the fallout from removal of
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
Diffstat (limited to 'src/libtime')
-rw-r--r--src/libtime/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index 2e4773fea24..1cc2d4b8a71 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -1044,7 +1044,7 @@ pub fn strftime(format: &str, tm: &Tm) -> ~str {
         }
     }
 
-    let mut buf = ~[];
+    let mut buf = Vec::new();
 
     let mut rdr = BufReader::new(format.as_bytes());
     loop {
@@ -1063,7 +1063,7 @@ pub fn strftime(format: &str, tm: &Tm) -> ~str {
         }
     }
 
-    str::from_utf8_owned(buf).unwrap()
+    str::from_utf8(buf.as_slice()).unwrap().to_str()
 }
 
 #[cfg(test)]