diff options
author | Luca Casonato <hello@lcas.dev> | 2021-09-02 23:38:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 23:38:44 +0200 |
commit | 1bf7b90ca8ad8e2bf62e455c24d5498c9ee74a46 (patch) | |
tree | e92ed4d8cce51a38d8e728e5d4108edca018231d /runtime | |
parent | c84532b6d5a424694c519260f0cf407b1d8ba604 (diff) |
chore: update dependencies (#11856)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/Cargo.toml | 16 | ||||
-rw-r--r-- | runtime/errors.rs | 21 | ||||
-rw-r--r-- | runtime/ops/fs_events.rs | 10 |
3 files changed, 21 insertions, 26 deletions
diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 520509450..8d6cee84c 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -64,23 +64,23 @@ deno_webstorage = { version = "0.11.0", path = "../ext/webstorage" } atty = "0.2.14" dlopen = "0.1.8" encoding_rs = "0.8.28" -filetime = "0.2.14" +filetime = "0.2.15" fs3 = "0.5.0" http = "0.2.4" -hyper = { version = "0.14.10", features = ["server", "stream", "http1", "http2", "runtime"] } +hyper = { version = "0.14.12", features = ["server", "stream", "http1", "http2", "runtime"] } # TODO(lucacasonato): unlock when https://github.com/tkaitchuck/aHash/issues/95 is resolved indexmap = "=1.6.2" lazy_static = "1.4.0" -libc = "0.2.98" +libc = "0.2.101" log = "0.4.14" -notify = "=5.0.0-pre.10" +notify = "=5.0.0-pre.12" percent-encoding = "2.1.0" -regex = "1.4.3" +regex = "1.5.4" ring = "0.16.20" -serde = { version = "1.0.126", features = ["derive"] } +serde = { version = "1.0.129", features = ["derive"] } sys-info = "0.9.0" termcolor = "1.1.2" -tokio = { version = "1.8.1", features = ["full"] } +tokio = { version = "1.10.1", features = ["full"] } uuid = { version = "0.8.2", features = ["v4"] } [target.'cfg(windows)'.dependencies] @@ -88,7 +88,7 @@ fwdansi = "1.1.0" winapi = { version = "0.3.9", features = ["knownfolders", "mswsock", "objbase", "shlobj", "tlhelp32", "winbase", "winerror", "winsock2"] } [target.'cfg(unix)'.dependencies] -nix = "0.20.0" +nix = "0.22.1" [dev-dependencies] # Used in benchmark diff --git a/runtime/errors.rs b/runtime/errors.rs index db14bd8bf..f88455b05 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -138,19 +138,16 @@ fn get_hyper_error_class(_error: &hyper::Error) -> &'static str { #[cfg(unix)] fn get_nix_error_class(error: &nix::Error) -> &'static str { - use nix::errno::Errno::*; match error { - nix::Error::Sys(ECHILD) => "NotFound", - nix::Error::Sys(EINVAL) => "TypeError", - nix::Error::Sys(ENOENT) => "NotFound", - nix::Error::Sys(ENOTTY) => "BadResource", - nix::Error::Sys(EPERM) => "PermissionDenied", - nix::Error::Sys(ESRCH) => "NotFound", - nix::Error::Sys(UnknownErrno) => "Error", - nix::Error::Sys(_) => "Error", - nix::Error::InvalidPath => "TypeError", - nix::Error::InvalidUtf8 => "InvalidData", - nix::Error::UnsupportedOperation => unreachable!(), + nix::Error::ECHILD => "NotFound", + nix::Error::EINVAL => "TypeError", + nix::Error::ENOENT => "NotFound", + nix::Error::ENOTTY => "BadResource", + nix::Error::EPERM => "PermissionDenied", + nix::Error::ESRCH => "NotFound", + nix::Error::UnknownErrno => "Error", + &nix::Error::ENOTSUP => unreachable!(), + _ => "Error", } } diff --git a/runtime/ops/fs_events.rs b/runtime/ops/fs_events.rs index 987a7f62a..30c6d3aaa 100644 --- a/runtime/ops/fs_events.rs +++ b/runtime/ops/fs_events.rs @@ -101,7 +101,7 @@ fn op_fs_events_open( let (sender, receiver) = mpsc::channel::<Result<FsEvent, AnyError>>(16); let sender = Mutex::new(sender); let mut watcher: RecommendedWatcher = - Watcher::new_immediate(move |res: Result<NotifyEvent, NotifyError>| { + 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, @@ -114,11 +114,9 @@ fn op_fs_events_open( RecursiveMode::NonRecursive }; for path in &args.paths { - state - .borrow_mut::<Permissions>() - .read - .check(&PathBuf::from(path))?; - watcher.watch(path, recursive_mode)?; + let path = PathBuf::from(path); + state.borrow_mut::<Permissions>().read.check(&path)?; + watcher.watch(&path, recursive_mode)?; } let resource = FsEventsResource { watcher, |