diff --git a/src/watch.rs b/src/watch.rs index 321bd89be..26b029d40 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -19,14 +19,13 @@ pub trait Watchable { } impl Watchable for Arc { - #[allow(while_true)] fn watch (&self) { let hbs = self.clone(); thread::spawn(move || { println!("watching path: {}", hbs.prefix); let prefix = hbs.prefix.clone(); let path = Path::new(&prefix); - while true { + loop { match _watch(&path) { Ok(_) => { println!("things changed");