Upgrade notify

This commit is contained in:
Félix Saparelli 2022-03-14 12:57:49 +13:00
parent 5e6adabf8d
commit 465895ddec
3 changed files with 26 additions and 7 deletions

28
Cargo.lock generated
View File

@ -1164,6 +1164,20 @@ dependencies = [
"winapi",
]
[[package]]
name = "mio"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ba42135c6a5917b9db9cd7b293e5409e1c6b041e6f9825e92e55a894c63b6f8"
dependencies = [
"libc",
"log",
"miow",
"ntapi",
"wasi 0.11.0+wasi-snapshot-preview1",
"winapi",
]
[[package]]
name = "miow"
version = "0.3.7"
@ -1238,9 +1252,9 @@ dependencies = [
[[package]]
name = "notify"
version = "5.0.0-pre.13"
version = "5.0.0-pre.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245d358380e2352c2d020e8ee62baac09b3420f1f6c012a31326cfced4ad487d"
checksum = "d13c22db70a63592e098fb51735bab36646821e6389a0ba171f3549facdf0b74"
dependencies = [
"bitflags",
"crossbeam-channel",
@ -1248,7 +1262,7 @@ dependencies = [
"inotify",
"kqueue",
"libc",
"mio",
"mio 0.8.1",
"walkdir",
"winapi",
]
@ -2136,7 +2150,7 @@ dependencies = [
"bytes",
"libc",
"memchr",
"mio",
"mio 0.7.14",
"num_cpus",
"once_cell",
"parking_lot",
@ -2505,6 +2519,12 @@ version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "watchexec"
version = "2.0.0-pre.11"

View File

@ -41,7 +41,7 @@ version = "0.13.22"
default-features = false
[dependencies.notify]
version = "5.0.0-pre.13"
version = "5.0.0-pre.14"
default-features = false
features = ["macos_kqueue"]

View File

@ -5,7 +5,6 @@ use std::{
fs::metadata,
mem::take,
path::{Path, PathBuf},
sync::{Arc, Mutex},
time::Duration,
};
@ -48,7 +47,7 @@ impl Watcher {
) -> Result<Box<dyn notify::Watcher + Send>, RuntimeError> {
match self {
Self::Native => notify::RecommendedWatcher::new(f).map(|w| Box::new(w) as _),
Self::Poll(delay) => notify::PollWatcher::with_delay(Arc::new(Mutex::new(f)), delay)
Self::Poll(delay) => notify::PollWatcher::with_delay(f, delay)
.map(|w| Box::new(w) as _),
}
.map_err(|err| RuntimeError::FsWatcher {