From d6d9b926836b1f1c2b8b3fe4ab35dc63bec7ffcd Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sat, 5 Oct 2013 19:49:32 -0700 Subject: path2: Adjust the API to remove all the _str mutation methods Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer. --- src/libstd/run.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/run.rs') diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 3f7ce3eae58..0d32efbba88 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -579,7 +579,7 @@ mod tests { let output = str::from_utf8(prog.finish_with_output().output); let parent_dir = os::getcwd(); - let child_dir = Path::from_str(output.trim()); + let child_dir = Path::new(output.trim()); let parent_stat = parent_dir.stat().unwrap(); let child_stat = child_dir.stat().unwrap(); @@ -596,7 +596,7 @@ mod tests { let mut prog = run_pwd(Some(&parent_dir)); let output = str::from_utf8(prog.finish_with_output().output); - let child_dir = Path::from_str(output.trim()); + let child_dir = Path::new(output.trim()); let parent_stat = parent_dir.stat().unwrap(); let child_stat = child_dir.stat().unwrap(); -- cgit 1.4.1-3-g733a5