diff options
author | Ding Xiang Fei <dingxiangfei2009@gmail.com> | 2019-09-12 07:24:20 +0800 |
---|---|---|
committer | Ding Xiang Fei <dingxiangfei2009@gmail.com> | 2019-09-12 09:30:54 +0800 |
commit | a348806589f5a5a54436682cfe5244e978583562 (patch) | |
tree | 15a725f865a1ce671bb8b91c045c1a4256c24ee8 | |
parent | 1a45a4e41e969ed987733c9b41998feba3d0e084 (diff) | |
download | nix-a348806589f5a5a54436682cfe5244e978583562.zip |
use slices for array comparison
-rw-r--r-- | test/test_fcntl.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_fcntl.rs b/test/test_fcntl.rs index 8fd6a533..38a1e7b9 100644 --- a/test/test_fcntl.rs +++ b/test/test_fcntl.rs @@ -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 |