From a43fff68e040d4165e3bb4cb798ac313684fa2aa Mon Sep 17 00:00:00 2001 From: Tom Gowan Date: Mon, 29 Apr 2019 09:13:47 +1000 Subject: [PATCH] better watch events --- src/watch.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/watch.rs b/src/watch.rs index 52ddebd..83fde00 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -100,8 +100,9 @@ fn create_watch( if let Ok(_) = thread_rx.try_recv() { break 'watch_loop; } - if let Ok(notify::DebouncedEvent::Create(_)) = - notify_rx.recv_timeout(Duration::from_secs(1)) + if let Ok(notify::DebouncedEvent::Create(_)) + | Ok(notify::DebouncedEvent::NoticeWrite(_)) + | Ok(notify::DebouncedEvent::Write(_)) = notify_rx.recv_timeout(Duration::from_secs(1)) { loader.reload(); }