Skip to content

Commit 357b41b

Browse files
committed
Path -> PathBuf for Windows test (fixup #22727)
1 parent d54ed56 commit 357b41b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libstd/env.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ mod tests {
927927
fn split_paths_windows() {
928928
fn check_parse(unparsed: &str, parsed: &[&str]) -> bool {
929929
split_paths(unparsed).collect::<Vec<_>>() ==
930-
parsed.iter().map(|s| Path::new(*s)).collect::<Vec<_>>()
930+
parsed.iter().map(|s| PathBuf::new(*s)).collect::<Vec<_>>()
931931
}
932932

933933
assert!(check_parse("", &mut [""]));

src/test/run-pass/env-home-dir.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ fn main() {
3737
assert!(home_dir().is_some());
3838

3939
set_var("HOME", "/home/MountainView");
40-
assert!(home_dir() == Some(Path::new("/home/MountainView")));
40+
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
4141

4242
remove_var("HOME");
4343

4444
set_var("USERPROFILE", "/home/MountainView");
45-
assert!(home_dir() == Some(Path::new("/home/MountainView")));
45+
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
4646

4747
set_var("HOME", "/home/MountainView");
4848
set_var("USERPROFILE", "/home/PaloAlto");
49-
assert!(home_dir() == Some(Path::new("/home/MountainView")));
49+
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
5050
}

0 commit comments

Comments
 (0)