diff options
author | Michael Baikov <manpacket@gmail.com> | 2022-08-04 07:54:45 +0800 |
---|---|---|
committer | Michael Baikov <manpacket@gmail.com> | 2022-08-04 09:44:40 +0800 |
commit | a6ee63ac3212e62518c97252581cfa48e2ad056e (patch) | |
tree | a57022d55d6c819491a1ac9c510049748034440e /test/sys/test_epoll.rs | |
parent | 854a5469c0475acf2e57b63740c9e447d3b9e4f8 (diff) | |
download | nix-a6ee63ac3212e62518c97252581cfa48e2ad056e.zip |
fix clippy assertions_on_result_states
https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_result_states
Diffstat (limited to 'test/sys/test_epoll.rs')
-rw-r--r-- | test/sys/test_epoll.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sys/test_epoll.rs b/test/sys/test_epoll.rs index fafbd749..91569159 100644 --- a/test/sys/test_epoll.rs +++ b/test/sys/test_epoll.rs @@ -6,11 +6,11 @@ use nix::sys::epoll::{EpollCreateFlags, EpollEvent, EpollFlags, EpollOp}; pub fn test_epoll_errno() { let efd = epoll_create1(EpollCreateFlags::empty()).unwrap(); let result = epoll_ctl(efd, EpollOp::EpollCtlDel, 1, None); - assert!(result.is_err()); + result.expect_err("assertion failed"); assert_eq!(result.unwrap_err(), Errno::ENOENT); let result = epoll_ctl(efd, EpollOp::EpollCtlAdd, 1, None); - assert!(result.is_err()); + result.expect_err("assertion failed"); assert_eq!(result.unwrap_err(), Errno::EINVAL); } |