Filesystem event watching is now cross-platform

main
Pantonshire 4 years ago
parent 207032382d
commit 70fb5ff675

16
Cargo.lock generated

@ -337,13 +337,11 @@ dependencies = [
[[package]] [[package]]
name = "flate2" name = "flate2"
version = "1.0.23" version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
dependencies = [ dependencies = [
"cfg-if 1.0.0",
"crc32fast", "crc32fast",
"libc",
"miniz_oxide", "miniz_oxide",
] ]
@ -515,9 +513,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "0.14.18" version = "0.14.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-channel", "futures-channel",
@ -544,9 +542,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "1.8.1" version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"hashbrown", "hashbrown",
@ -651,7 +649,7 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
[[package]] [[package]]
name = "libshire" name = "libshire"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/pantonshire/libshire#bd2b3a8a29b34ffeecd658b74ef81a1431fc91f0" source = "git+https://github.com/pantonshire/libshire#c0f0a3a01716ec48d91fa3daf035e506f3a36165"
[[package]] [[package]]
name = "line-wrap" name = "line-wrap"

@ -7,7 +7,7 @@ use std::{
use miette::{IntoDiagnostic, WrapErr}; use miette::{IntoDiagnostic, WrapErr};
use notify::{ use notify::{
DebouncedEvent, DebouncedEvent,
FsEventWatcher, RecommendedWatcher,
RecursiveMode, RecursiveMode,
Watcher, Watcher,
watcher, watcher,
@ -17,7 +17,7 @@ use tracing::info;
pub fn start_watching( pub fn start_watching(
tx: mpsc::Sender<DebouncedEvent>, tx: mpsc::Sender<DebouncedEvent>,
watch_path: &Path watch_path: &Path
) -> miette::Result<FsEventWatcher> ) -> miette::Result<RecommendedWatcher>
{ {
let mut watcher = watcher(tx, Duration::from_secs(2)) let mut watcher = watcher(tx, Duration::from_secs(2))
.into_diagnostic() .into_diagnostic()

Loading…
Cancel
Save