From 7832cc05994587dcd3b9c2dbb04f5d1c1df4b272 Mon Sep 17 00:00:00 2001 From: unrelentingtech Date: Fri, 15 Apr 2022 06:17:31 +0300 Subject: [PATCH] Use notify::RecommendedWatcher to simplify code and support BSD platforms (#165) Along with https://github.com/notify-rs/notify/pull/399 this fixes build on FreeBSD. --- src/context/app_context.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/context/app_context.rs b/src/context/app_context.rs index 3f7975d7..44276111 100644 --- a/src/context/app_context.rs +++ b/src/context/app_context.rs @@ -55,12 +55,7 @@ pub struct AppContext { // user interface context; data which is input to both, the UI rendering and the app state ui_context: UiContext, // filesystem watcher to inform about changes in shown directories - #[cfg(target_os = "linux")] - watcher: notify::INotifyWatcher, - #[cfg(target_os = "macos")] - watcher: notify::FsEventWatcher, - #[cfg(not(any(target_os = "linux", target_os = "macos")))] - watcher: notify::NullWatcher, + watcher: notify::RecommendedWatcher, // list of watched paths; seems not to be possible to get them from a notify::Watcher watched_paths: HashSet, // the last preview area (or None if now preview shown) to check if a preview hook script needs