about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2014-03-26 22:46:25 -0700
committerSteven Fackler <sfackler@gmail.com>2014-04-06 15:40:01 -0700
commit49a80810950a2f2ea12f5efd4cf188cb68cb1283 (patch)
tree093ff0d95856e003e28560bc224cac574a003461 /src/test
parentd0e60b72ee3f5fb07b01143d82362cb42307f32d (diff)
De-~[] Mem{Reader,Writer}
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs2
-rw-r--r--src/test/run-pass/ifmt.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index 9da32707ef1..4c367b85394 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -154,7 +154,7 @@ fn main() {
 
     let rdr = if os::getenv("RUST_BENCH").is_some() {
         let foo = include_bin!("shootout-k-nucleotide.data");
-        ~MemReader::new(foo.to_owned()) as ~Reader
+        ~MemReader::new(Vec::from_slice(foo)) as ~Reader
     } else {
         ~stdio::stdin() as ~Reader
     };
diff --git a/src/test/run-pass/ifmt.rs b/src/test/run-pass/ifmt.rs
index 7cdd932faf6..1676463e544 100644
--- a/src/test/run-pass/ifmt.rs
+++ b/src/test/run-pass/ifmt.rs
@@ -174,7 +174,7 @@ fn test_write() {
         writeln!(w, "{foo}", foo="bar");
     }
 
-    let s = str::from_utf8_owned(buf.unwrap()).unwrap();
+    let s = str::from_utf8(buf.unwrap().as_slice()).unwrap().to_owned();
     t!(s, "34helloline\nbar\n");
 }
 
@@ -198,7 +198,7 @@ fn test_format_args() {
         format_args!(|args| { fmt::write(w, args); }, "test");
         format_args!(|args| { fmt::write(w, args); }, "{test}", test=3);
     }
-    let s = str::from_utf8_owned(buf.unwrap()).unwrap();
+    let s = str::from_utf8(buf.unwrap().as_slice()).unwrap().to_owned();
     t!(s, "1test3");
 
     let s = format_args!(fmt::format, "hello {}", "world");