Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PollWatcher: unify signature of
new
and with_delay
* Move `event_handler` logic from `new` to `with_delay` to be able to call: ```rust let (tx, rx) = std::sync::mpsc::channel(); let mut watcher = PollWatcher::with_delay(tx, Duration::from_secs(1))?; ``` instead of: ```rust let (tx, rx) = std::sync::mpsc::channel(); let mut watcher = PollWatcher::with_delay(Arc::new(Mutex::new(tx)), Duration::from_secs(1))?; ``` * Add documentation
- Loading branch information