rollup merge of #23886: demelev/remove_as_slice_usage

This commit is contained in:
Alex Crichton 2015-03-31 10:15:35 -07:00
commit 6d2c640cf0
24 changed files with 41 additions and 42 deletions

View file

@ -1333,7 +1333,7 @@ mod tests {
check!(fs::copy(&input, &out));
let mut v = Vec::new();
check!(check!(File::open(&out)).read_to_end(&mut v));
assert_eq!(v.as_slice(), b"hello");
assert_eq!(&v[..], b"hello");
assert_eq!(check!(input.metadata()).permissions(),
check!(out.metadata()).permissions());
@ -1628,7 +1628,7 @@ mod tests {
check!(check!(File::create(&tmpdir.join("test"))).write(&bytes));
let mut v = Vec::new();
check!(check!(File::open(&tmpdir.join("test"))).read_to_end(&mut v));
assert!(v == bytes.as_slice());
assert!(v == &bytes[..]);
}
#[test]