Upgrade to notify pre.12

This commit is contained in:
Félix Saparelli 2021-08-20 02:59:39 +12:00
parent 95ad3e91ff
commit 9f34492c79
No known key found for this signature in database
GPG Key ID: B948C4BAE44FC474
3 changed files with 6 additions and 5 deletions

6
Cargo.lock generated
View File

@ -1139,9 +1139,9 @@ dependencies = [
[[package]]
name = "notify"
version = "5.0.0-pre.11"
version = "5.0.0-pre.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c614e7ed2b1cf82ec99aeffd8cf6225ef5021b9951148eb161393c394855032c"
checksum = "20a629259bb2c87a884bb76f6086c8637919de6d074754341c12e5dd3aed6326"
dependencies = [
"bitflags 1.2.1",
"crossbeam-channel",
@ -2080,7 +2080,7 @@ dependencies = [
"dunce",
"futures",
"miette",
"notify 5.0.0-pre.11",
"notify 5.0.0-pre.12",
"thiserror",
"tokio",
"tracing",

View File

@ -16,7 +16,7 @@ edition = "2018"
[dependencies]
miette = "0.7.0"
notify = "5.0.0-pre.11"
notify = "5.0.0-pre.12"
thiserror = "1.0.26"
tracing = "0.1.26"
dunce = "1.0.2"

View File

@ -5,6 +5,7 @@ use std::{
path::PathBuf,
};
use notify::Watcher as _;
use tokio::sync::{mpsc, watch};
use tracing::{debug, trace};
@ -33,7 +34,7 @@ impl Default for Watcher {
impl Watcher {
fn create(
self,
f: impl notify::EventFn,
f: impl notify::EventHandler,
) -> Result<Box<dyn notify::Watcher + Send>, RuntimeError> {
match self {
Self::Native => notify::RecommendedWatcher::new(f).map(|w| Box::new(w) as _),