show_events/
show-events.rs1use futures::StreamExt;
2use wtr_watcher::Watch;
3
4#[tokio::main(flavor = "current_thread")]
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let show = |e| async move { println!("{e:?}") };
7 let events = Watch::try_new(".")?;
8 events.for_each(show).await;
9 Ok(())
10}