diff --git a/test/mkdir.rs b/test/mkdir.rs index be0bb743d..f8e543f8b 100644 --- a/test/mkdir.rs +++ b/test/mkdir.rs @@ -1,5 +1,6 @@ use std::io::process::Command; use std::io::fs::{rmdir, PathExtensions}; +use std::borrow::ToOwned; static EXE: &'static str = "./mkdir"; static TEST_DIR1: &'static str = "mkdir_test1"; @@ -9,8 +10,8 @@ static TEST_DIR4: &'static str = "mkdir_test4/mkdir_test4_1"; static TEST_DIR5: &'static str = "mkdir_test5/mkdir_test5_1"; fn cleanup(dir: &'static str) { - let d = dir.into_string(); - let p = Path::new(d.into_string()); + let d = dir.to_owned(); + let p = Path::new(d.to_owned()); if p.exists() { rmdir(&p).unwrap(); } diff --git a/test/mv.rs b/test/mv.rs index 241780216..b853d327c 100644 --- a/test/mv.rs +++ b/test/mv.rs @@ -7,6 +7,7 @@ use std::io::process::Command; use std::io::fs::PathExtensions; use std::io::pipe::PipeStream; use std::str::from_utf8; +use std::borrow::ToOwned; static EXE: &'static str = "./mv"; @@ -27,8 +28,8 @@ fn run(cmd: &mut Command) -> CmdResult { let prog = cmd.spawn().unwrap().wait_with_output().unwrap(); CmdResult { success: prog.status.success(), - stderr: from_utf8(prog.error.as_slice()).unwrap().into_string(), - stdout: from_utf8(prog.output.as_slice()).unwrap().into_string(), + stderr: from_utf8(prog.error.as_slice()).unwrap().to_owned(), + stdout: from_utf8(prog.output.as_slice()).unwrap().to_owned(), } } fn run_interactive(cmd: &mut Command, f: |&mut PipeStream|) -> CmdResult { @@ -40,8 +41,8 @@ fn run_interactive(cmd: &mut Command, f: |&mut PipeStream|) -> CmdResult { let prog = command.wait_with_output().unwrap(); CmdResult { success: prog.status.success(), - stderr: from_utf8(prog.error.as_slice()).unwrap().into_string(), - stdout: from_utf8(prog.output.as_slice()).unwrap().into_string(), + stderr: from_utf8(prog.error.as_slice()).unwrap().to_owned(), + stdout: from_utf8(prog.output.as_slice()).unwrap().to_owned(), } }