Skip to content

Commit a348806

Browse files
use slices for array comparison
1 parent 1a45a4e commit a348806

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_fcntl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ mod test_posix_fallocate {
256256
Ok(_) => {
257257
let mut data = [1u8; LEN];
258258
assert_eq!(tmp.read(&mut data).expect("read failure"), LEN);
259-
assert_eq!(&data as &[u8], &[0u8; LEN] as &[u8]);
259+
assert_eq!(&data[..], &[0u8; LEN][..]);
260260
}
261261
Err(nix::Error::Sys(Errno::EINVAL)) => {
262262
// POSIX requires posix_fallocate to return EINVAL both for

0 commit comments

Comments
 (0)