watchexec/crates/events/examples/parse-and-print.rs

12 lines
198 B
Rust
Raw Normal View History

2023-03-18 09:32:24 +01:00
use std::io::{stdin, Result};
use watchexec_events::Event;
fn main() -> Result<()> {
for line in stdin().lines() {
let event: Event = serde_json::from_str(&line?)?;
dbg!(event);
}
Ok(())
}