forked from lavender-legacy/lavender.software
Simplify watch loop
parent
89f26b9a0e
commit
26b30cd030
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue