From 2a345cf52ce38c8609732c2883caf7fb1b028869 Mon Sep 17 00:00:00 2001 From: rabite Date: Thu, 11 Apr 2019 14:18:02 +0200 Subject: update version in Cargo.ml --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cad8669..5220100 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,7 +239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hunter" -version = "1.0.1" +version = "1.0.4" dependencies = [ "alphanumeric-sort 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index c173b9a..3d34d83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hunter" -version = "1.0.1" +version = "1.0.4" authors = ["rabite"] edition = "2018" description = "Fast, lag-free terminal file browser" -- cgit v1.2.3 From 3e47d407c4d404e5fc3db88e2b365a2df7846a54 Mon Sep 17 00:00:00 2001 From: rabite Date: Thu, 11 Apr 2019 14:18:50 +0200 Subject: use RecommendedWatcher for cross-platform support --- src/fscache.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fscache.rs b/src/fscache.rs index 7add081..e5b1340 100644 --- a/src/fscache.rs +++ b/src/fscache.rs @@ -1,4 +1,4 @@ -use notify::{INotifyWatcher, Watcher, DebouncedEvent, RecursiveMode}; +use notify::{RecommendedWatcher, Watcher, DebouncedEvent, RecursiveMode}; use std::sync::{Arc, RwLock}; use std::sync::mpsc::{channel, Sender, Receiver}; @@ -69,7 +69,7 @@ pub struct FsCache { files: Arc>>, pub tab_settings: Arc>>, watched_dirs: Arc>>, - watcher: Arc>, + watcher: Arc>, pub fs_changes: Arc, Option)>>>, sender: Sender, } @@ -77,7 +77,7 @@ pub struct FsCache { impl FsCache { pub fn new(sender: Sender) -> FsCache { let (tx_fs_event, rx_fs_event) = channel(); - let watcher = INotifyWatcher::new(tx_fs_event, + let watcher = RecommendedWatcher::new(tx_fs_event, Duration::from_secs(2)).unwrap(); -- cgit v1.2.3