summaryrefslogtreecommitdiff
path: root/test/sys/test_inotify.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-19 08:29:31 -0600
committerGitHub <noreply@github.com>2021-09-19 08:29:31 -0600
commit515e99bcffcf324d03128649f3ee0ca14d67b5b1 (patch)
tree654a84d639d1feca971396f958f7589fc1fb81bf /test/sys/test_inotify.rs
parentf0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff)
parenta09b1c8ac643d448db479a108ac6726307075453 (diff)
downloadnix-515e99bcffcf324d03128649f3ee0ca14d67b5b1.zip
Merge pull request #1529 from asomers/clippy-9-2021
Clippy cleanup
Diffstat (limited to 'test/sys/test_inotify.rs')
-rw-r--r--test/sys/test_inotify.rs6
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();