diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/Cargo.toml | 4 | ||||
-rw-r--r-- | runtime/ops/fs_events.rs | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 77928531c..46e3c9504 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -76,7 +76,7 @@ libc = "0.2.126" log = "0.4.16" lzzzz = '1.0' netif = "0.1.3" -notify = "=5.0.0-pre.15" +notify = "5.0" once_cell = "1.10.0" regex = "1.6.0" ring = "0.16.20" @@ -84,7 +84,7 @@ serde = { version = "1.0.136", features = ["derive"] } signal-hook-registry = "1.4.0" sys-info = "0.9.1" termcolor = "1.1.3" -tokio = { version = "1.19", features = ["full"] } +tokio = { version = "1.21", features = ["full"] } uuid = { version = "1.0.0", features = ["v4"] } [target.'cfg(windows)'.dependencies] diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index 02acbd0cc..5e185c4bc 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -101,14 +101,16 @@ fn op_fs_events_open( ) -> Result<ResourceId, AnyError> { let (sender, receiver) = mpsc::channel::<Result<FsEvent, AnyError>>(16); let sender = Mutex::new(sender); - let mut watcher: RecommendedWatcher = - Watcher::new(move |res: Result<NotifyEvent, NotifyError>| { + let mut watcher: RecommendedWatcher = Watcher::new( + move |res: Result<NotifyEvent, NotifyError>| { let res2 = res.map(FsEvent::from).map_err(AnyError::from); let sender = sender.lock(); // Ignore result, if send failed it means that watcher was already closed, // but not all messages have been flushed. let _ = sender.try_send(res2); - })?; + }, + Default::default(), + )?; let recursive_mode = if args.recursive { RecursiveMode::Recursive } else { |