mirror of https://github.com/bobwen-dev/hunter
Merge branch 'master' into evil
This commit is contained in:
commit
f93bdd6527
|
@ -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)",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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<RwLock<HashMap<File, Files>>>,
|
||||
pub tab_settings: Arc<RwLock<HashMap<File, TabSettings>>>,
|
||||
watched_dirs: Arc<RwLock<HashSet<File>>>,
|
||||
watcher: Arc<RwLock<INotifyWatcher>>,
|
||||
watcher: Arc<RwLock<RecommendedWatcher>>,
|
||||
pub fs_changes: Arc<RwLock<Vec<(File, Option<File>, Option<File>)>>>,
|
||||
sender: Sender<Events>,
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ pub struct FsCache {
|
|||
impl FsCache {
|
||||
pub fn new(sender: Sender<Events>) -> 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();
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue