path2: Replace the path module outright
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
This commit is contained in:
parent
6741241f40
commit
73d3d00ec4
63 changed files with 2501 additions and 2989 deletions
|
|
@ -578,8 +578,8 @@ mod tests {
|
|||
let mut prog = run_pwd(None);
|
||||
|
||||
let output = str::from_utf8(prog.finish_with_output().output);
|
||||
let parent_dir = os::getcwd().normalize();
|
||||
let child_dir = Path(output.trim()).normalize();
|
||||
let parent_dir = os::getcwd();
|
||||
let child_dir = Path::from_str(output.trim());
|
||||
|
||||
let parent_stat = parent_dir.stat().unwrap();
|
||||
let child_stat = child_dir.stat().unwrap();
|
||||
|
|
@ -592,11 +592,11 @@ mod tests {
|
|||
fn test_change_working_directory() {
|
||||
// test changing to the parent of os::getcwd() because we know
|
||||
// the path exists (and os::getcwd() is not expected to be root)
|
||||
let parent_dir = os::getcwd().dir_path().normalize();
|
||||
let parent_dir = os::getcwd().dir_path();
|
||||
let mut prog = run_pwd(Some(&parent_dir));
|
||||
|
||||
let output = str::from_utf8(prog.finish_with_output().output);
|
||||
let child_dir = Path(output.trim()).normalize();
|
||||
let child_dir = Path::from_str(output.trim());
|
||||
|
||||
let parent_stat = parent_dir.stat().unwrap();
|
||||
let child_stat = child_dir.stat().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue