Skip to content

Commit

Permalink
use slices for array comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiangfei2009 committed Sep 11, 2019
1 parent e87b8f4 commit 9edda30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_fcntl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ mod test_posix_fallocate {
Ok(_) => {
let mut data = [1u8; LEN];
assert_eq!(tmp.read(&mut data).expect("read failure"), LEN);
assert_eq!(&data as &[u8], &[0u8; LEN] as &[u8]);
assert_eq!(&data[..], &[0u8; LEN][..]);
}
Err(nix::Error::Sys(Errno::EINVAL)) => {
// POSIX requires posix_fallocate to return EINVAL both for
Expand Down

0 comments on commit 9edda30

Please sign in to comment.