Skip to content

Commit 7773a66

Browse files
committed
examples/linux-inotify.rs: Fix usage of function deprecated in inotify 0.10.1
1 parent 462a5b2 commit 7773a66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/linux-inotify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn main() -> std::io::Result<()> {
3737
future::block_on(async {
3838
// Watch events in the current directory.
3939
let mut inotify = Async::new(Inotify::init()?)?;
40-
inotify.get_mut().add_watch(".", WatchMask::ALL_EVENTS)?;
40+
inotify.get_mut().watches().add(".", WatchMask::ALL_EVENTS)?;
4141
println!("Watching for filesystem events in the current directory...");
4242
println!("Try opening a file to trigger some events.");
4343
println!();

0 commit comments

Comments
 (0)