diff options
Diffstat (limited to 'src/libstd/env.rs')
| -rw-r--r-- | src/libstd/env.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index bcc109a71cb..3ed891d024f 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -772,7 +772,7 @@ mod tests { } fn eq(a: Option<OsString>, b: Option<&str>) { - assert_eq!(a.as_ref().map(|s| &**s), b.map(OsStr::from_str).map(|s| &*s)); + assert_eq!(a.as_ref().map(|s| &**s), b.map(OsStr::new).map(|s| &*s)); } #[test] @@ -895,7 +895,7 @@ mod tests { fn join_paths_unix() { fn test_eq(input: &[&str], output: &str) -> bool { &*join_paths(input.iter().cloned()).unwrap() == - OsStr::from_str(output) + OsStr::new(output) } assert!(test_eq(&[], "")); @@ -911,7 +911,7 @@ mod tests { fn join_paths_windows() { fn test_eq(input: &[&str], output: &str) -> bool { &*join_paths(input.iter().cloned()).unwrap() == - OsStr::from_str(output) + OsStr::new(output) } assert!(test_eq(&[], "")); |
