Skip to content

Commit df77708

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

File tree

3 files changed

+41
-116
lines changed

3 files changed

+41
-116
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-5
Original file line numberDiff line numberDiff line change
@@ -108,7 +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)
111+
let mut debouncer = match notify_debouncer_mini::new_debouncer(Duration::from_secs(1), tx)
112112
{
113113
Ok(d) => d,
114114
Err(e) => {
@@ -157,10 +157,8 @@ where
157157
let paths: Vec<_> = all_events
158158
.filter_map(|event| match event {
159159
Ok(events) => Some(events),
160-
Err(errors) => {
161-
for error in errors {
162-
log::warn!("error while watching for changes: {error}");
163-
}
160+
Err(error) => {
161+
log::warn!("error while watching for changes: {error}");
164162
None
165163
}
166164
})

0 commit comments

Comments
 (0)