diff --git a/build_src/main.rs b/build_src/main.rs index 8716f44..95ddbd0 100644 --- a/build_src/main.rs +++ b/build_src/main.rs @@ -74,11 +74,8 @@ fn main() { let mut watcher = watcher(tx, Duration::from_millis(100)).unwrap(); watcher.watch("./src", RecursiveMode::Recursive).unwrap(); - loop { - match rx.recv() { - Ok(_) => build(), - Err(_) => break, - } + while rx.recv().is_ok() { + build() } } }