]> git.lizzy.rs Git - rust.git/blobdiff - src/libtime/lib.rs
test: Make manual changes to deal with the fallout from removal of
[rust.git] / src / libtime / lib.rs
index 2e4773fea249a7234d74dcac2651fd6d07ce5846..1cc2d4b8a711157fc014b45c62d6b56f29f2c999 100644 (file)
@@ -1044,7 +1044,7 @@ fn parse_type(ch: char, tm: &Tm) -> ~str {
         }
     }
 
-    let mut buf = ~[];
+    let mut buf = Vec::new();
 
     let mut rdr = BufReader::new(format.as_bytes());
     loop {
@@ -1063,7 +1063,7 @@ fn parse_type(ch: char, tm: &Tm) -> ~str {
         }
     }
 
-    str::from_utf8_owned(buf).unwrap()
+    str::from_utf8(buf.as_slice()).unwrap().to_str()
 }
 
 #[cfg(test)]