diff options
author | Costin-Robert Sin <sin.costinrobert@gmail.com> | 2022-06-21 15:36:05 +0300 |
---|---|---|
committer | Costin-Robert Sin <sin.costinrobert@gmail.com> | 2022-06-24 00:35:52 +0300 |
commit | 3e6cb639f0d9afde57d9cc03526c2e488641231b (patch) | |
tree | c882f2947fa5b22e67a58918c45012655b892b30 /test/sys/test_inotify.rs | |
parent | 8f08a69c28fad5ee875d69e4c8a1b8eed2203cb4 (diff) | |
download | nix-3e6cb639f0d9afde57d9cc03526c2e488641231b.zip |
Fix all formating problems to pass CI formating test
Signed-off-by: Costin-Robert Sin <sin.costinrobert@gmail.com>
Diffstat (limited to 'test/sys/test_inotify.rs')
-rw-r--r-- | test/sys/test_inotify.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/test/sys/test_inotify.rs b/test/sys/test_inotify.rs index 137816a3..bb5851a9 100644 --- a/test/sys/test_inotify.rs +++ b/test/sys/test_inotify.rs @@ -1,15 +1,16 @@ -use nix::sys::inotify::{AddWatchFlags,InitFlags,Inotify}; use nix::errno::Errno; +use nix::sys::inotify::{AddWatchFlags, InitFlags, Inotify}; use std::ffi::OsString; use std::fs::{rename, File}; #[test] pub fn test_inotify() { - let instance = Inotify::init(InitFlags::IN_NONBLOCK) - .unwrap(); + let instance = Inotify::init(InitFlags::IN_NONBLOCK).unwrap(); let tempdir = tempfile::tempdir().unwrap(); - instance.add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS).unwrap(); + instance + .add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS) + .unwrap(); let events = instance.read_events(); assert_eq!(events.unwrap_err(), Errno::EAGAIN); @@ -22,11 +23,12 @@ pub fn test_inotify() { #[test] pub fn test_inotify_multi_events() { - let instance = Inotify::init(InitFlags::IN_NONBLOCK) - .unwrap(); + let instance = Inotify::init(InitFlags::IN_NONBLOCK).unwrap(); let tempdir = tempfile::tempdir().unwrap(); - instance.add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS).unwrap(); + instance + .add_watch(tempdir.path(), AddWatchFlags::IN_ALL_EVENTS) + .unwrap(); let events = instance.read_events(); assert_eq!(events.unwrap_err(), Errno::EAGAIN); |