diff options
Diffstat (limited to 'src/libstd/path/windows.rs')
| -rw-r--r-- | src/libstd/path/windows.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index b8016e3e8f4..a053f57bf12 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -1195,7 +1195,7 @@ mod tests { #[test] fn test_paths() { - let empty: &[u8] = []; + let empty: &[u8] = &[]; t!(v: Path::new(empty), b"."); t!(v: Path::new(b"\\"), b"\\"); t!(v: Path::new(b"a\\b\\c"), b"a\\b\\c"); @@ -1571,14 +1571,14 @@ mod tests { (s: $path:expr, $push:expr, $exp:expr) => ( { let mut p = Path::new($path); - p.push_many($push); + p.push_many(&$push); assert_eq!(p.as_str(), Some($exp)); } ); (v: $path:expr, $push:expr, $exp:expr) => ( { let mut p = Path::new($path); - p.push_many($push); + p.push_many(&$push); assert_eq!(p.as_vec(), $exp); } ) @@ -1712,14 +1712,14 @@ mod tests { (s: $path:expr, $join:expr, $exp:expr) => ( { let path = Path::new($path); - let res = path.join_many($join); + let res = path.join_many(&$join); assert_eq!(res.as_str(), Some($exp)); } ); (v: $path:expr, $join:expr, $exp:expr) => ( { let path = Path::new($path); - let res = path.join_many($join); + let res = path.join_many(&$join); assert_eq!(res.as_vec(), $exp); } ) @@ -2252,7 +2252,7 @@ mod tests { let path = Path::new($path); let comps = path.str_components().map(|x|x.unwrap()) .collect::<Vec<&str>>(); - let exp: &[&str] = $exp; + let exp: &[&str] = &$exp; assert_eq!(comps.as_slice(), exp); let comps = path.str_components().rev().map(|x|x.unwrap()) .collect::<Vec<&str>>(); @@ -2309,7 +2309,7 @@ mod tests { { let path = Path::new($path); let comps = path.components().collect::<Vec<&[u8]>>(); - let exp: &[&[u8]] = $exp; + let exp: &[&[u8]] = &$exp; assert_eq!(comps.as_slice(), exp); let comps = path.components().rev().collect::<Vec<&[u8]>>(); let exp = exp.iter().rev().map(|&x|x).collect::<Vec<&[u8]>>(); |
