1
0
mirror of synced 2025-11-09 12:57:13 +00:00

better watch events

This commit is contained in:
Tom Gowan
2019-04-29 09:13:47 +10:00
parent 6eca607ca3
commit a43fff68e0

View File

@@ -100,8 +100,9 @@ fn create_watch(
if let Ok(_) = thread_rx.try_recv() { if let Ok(_) = thread_rx.try_recv() {
break 'watch_loop; break 'watch_loop;
} }
if let Ok(notify::DebouncedEvent::Create(_)) = if let Ok(notify::DebouncedEvent::Create(_))
notify_rx.recv_timeout(Duration::from_secs(1)) | Ok(notify::DebouncedEvent::NoticeWrite(_))
| Ok(notify::DebouncedEvent::Write(_)) = notify_rx.recv_timeout(Duration::from_secs(1))
{ {
loader.reload(); loader.reload();
} }