summaryrefslogtreecommitdiff
path: root/cli/file_watcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/file_watcher.rs')
-rw-r--r--cli/file_watcher.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/cli/file_watcher.rs b/cli/file_watcher.rs
index 4aa93c581..ef7aae603 100644
--- a/cli/file_watcher.rs
+++ b/cli/file_watcher.rs
@@ -240,16 +240,17 @@ fn new_watcher(
) -> Result<RecommendedWatcher, AnyError> {
let event_detected = Arc::clone(&debounce.event_detected);
- let mut watcher: RecommendedWatcher = Watcher::new_immediate(
- move |res: Result<NotifyEvent, NotifyError>| {
+ let mut watcher: RecommendedWatcher =
+ Watcher::new_immediate(move |res: Result<NotifyEvent, NotifyError>| {
if let Ok(event) = res {
- if matches!(event.kind, EventKind::Create(_) | EventKind::Modify(_) | EventKind::Remove(_))
- {
+ if matches!(
+ event.kind,
+ EventKind::Create(_) | EventKind::Modify(_) | EventKind::Remove(_)
+ ) {
event_detected.store(true, Ordering::Relaxed);
}
}
- },
- )?;
+ })?;
watcher.configure(Config::PreciseEvents(true)).unwrap();