From a09b1c8ac643d448db479a108ac6726307075453 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 18 Sep 2021 21:07:00 -0600 Subject: Clippy cleanup And this time, start running Clippy in CI --- test/sys/test_inotify.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/sys/test_inotify.rs') 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(); -- cgit v1.2.3