Repository: hannobraun/inotify-rs (language: rust)

Issue:
Remove example that works around issue #120
It's no longer as useful, as #120 is fixed now. It should be removed, and the technique it shows should be integrated into the API documentation.


Discussion / hints:

Fix patch:
diff --git a/Cargo.toml b/Cargo.toml
index 9ed2382..757b7c3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -49,10 +49,6 @@ required-features = ["stream"]
 [[example]]
 name = "watch"
 
-[[example]]
-name = "issue-120-workaround"
-required-features = ["stream"]
-
 [package.metadata.release]
 pre-release-commit-message = "chore: Release version {{version}}"
 pro-release-commit-message = "chore: Bump version to {{version}}"
diff --git a/examples/issue-120-workaround.rs b/examples/issue-120-workaround.rs
deleted file mode 100644
index 5a14682..0000000
--- a/examples/issue-120-workaround.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-extern crate futures;
-extern crate inotify;
-extern crate tempdir;
-extern crate tokio;
-
-use inotify::{Inotify, WatchMask};
-use std::{fs::File, io, thread, time::Duration};
-use tempdir::TempDir;
-use tokio::prelude::*;
-
-fn main() -> Result<(), io::Error> {
-
-    let mut inotify = Inotify::init()?;
-
-    let dir = TempDir::new("inotify-rs-test")?;
-
-    inotify.add_watch(dir.path(), WatchMask::CREATE | WatchMask::MODIFY)?;
-
-    thread::spawn::<_, Result<(), io::Error>>(move || loop {
-        File::create(dir.path().join("file"))?;
-        thread::sleep(Duration::from_millis(500));
-    });
-
-    let future = inotify
-        .event_stream([0; 32])
-        .map_err(|e| println!("inotify error: {:?}", e))
-        .for_each(move |event| {
-            println!("event: {:?}", event);
-            Ok(())
-        });
-
-    tokio::run(future);
-    Ok(())
-}


Test patch: