Skip to content

Commit 079f52a

Browse files
committed
upgrade to notify 6.1.1 and watcher-mini 4.1
1 parent 56c225b commit 079f52a

File tree

3 files changed

+41
-117
lines changed

3 files changed

+41
-117
lines changed

Cargo.lock

+36-109
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ toml = "0.5.11" # Do not update, see https://github.com/rust-lang/mdBook/issues/
3737
topological-sort = "0.2.2"
3838

3939
# Watch feature
40-
notify = { version = "6.0.1", optional = true }
41-
notify-debouncer-mini = { version = "0.3.0", optional = true }
40+
notify = { version = "6.1.1", optional = true }
41+
notify-debouncer-mini = { version = "0.4.1", optional = true }
4242
ignore = { version = "0.4.20", optional = true }
4343

4444
# Serve feature

src/cmd/watch.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ where
108108
// Create a channel to receive the events.
109109
let (tx, rx) = channel();
110110

111-
let mut debouncer = match notify_debouncer_mini::new_debouncer(Duration::from_secs(1), None, tx)
112-
{
111+
let mut debouncer = match notify_debouncer_mini::new_debouncer(Duration::from_secs(1), tx) {
113112
Ok(d) => d,
114113
Err(e) => {
115114
error!("Error while trying to watch the files:\n\n\t{:?}", e);
@@ -157,10 +156,8 @@ where
157156
let paths: Vec<_> = all_events
158157
.filter_map(|event| match event {
159158
Ok(events) => Some(events),
160-
Err(errors) => {
161-
for error in errors {
162-
log::warn!("error while watching for changes: {error}");
163-
}
159+
Err(error) => {
160+
log::warn!("error while watching for changes: {error}");
164161
None
165162
}
166163
})

0 commit comments

Comments
 (0)