diff options
author | Alan Somers <asomers@gmail.com> | 2021-09-18 21:07:00 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-09-19 07:58:15 -0600 |
commit | a09b1c8ac643d448db479a108ac6726307075453 (patch) | |
tree | 654a84d639d1feca971396f958f7589fc1fb81bf /test/sys/test_inotify.rs | |
parent | f0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff) | |
download | nix-a09b1c8ac643d448db479a108ac6726307075453.zip |
Clippy cleanup
And this time, start running Clippy in CI
Diffstat (limited to 'test/sys/test_inotify.rs')
-rw-r--r-- | test/sys/test_inotify.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/sys/test_inotify.rs b/test/sys/test_inotify.rs index 121b726c..137816a3 100644 --- a/test/sys/test_inotify.rs +++ b/test/sys/test_inotify.rs @@ -1,7 +1,5 @@ use nix::sys::inotify::{AddWatchFlags,InitFlags,Inotify}; -use nix::Error; use nix::errno::Errno; -use tempfile; use std::ffi::OsString; use std::fs::{rename, File}; @@ -14,7 +12,7 @@ pub fn test_inotify() { instance.add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS).unwrap(); let events = instance.read_events(); - assert_eq!(events.unwrap_err(), Error::from(Errno::EAGAIN)); + assert_eq!(events.unwrap_err(), Errno::EAGAIN); File::create(tempdir.path().join("test")).unwrap(); @@ -31,7 +29,7 @@ pub fn test_inotify_multi_events() { instance.add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS).unwrap(); let events = instance.read_events(); - assert_eq!(events.unwrap_err(), Error::from(Errno::EAGAIN)); + assert_eq!(events.unwrap_err(), Errno::EAGAIN); File::create(tempdir.path().join("test")).unwrap(); rename(tempdir.path().join("test"), tempdir.path().join("test2")).unwrap(); |