diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c65279de..d545a22c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: # main branches - main - next + - '*' pull_request: release: types: [released, prereleased] @@ -18,7 +19,7 @@ jobs: strategy: matrix: version: - - 1.60.0 # MSRV + - 1.63.0 # MSRV - stable - nightly os: @@ -38,19 +39,19 @@ jobs: rustup override set ${{ matrix.version }} - name: check build serde,macos_kqueue for examples - if: matrix.version != '1.60.0' && matrix.os == 'macos-latest' + if: matrix.version != '1.63.0' && matrix.os == 'macos-latest' run: cargo check -p notify --features=serde,macos_kqueue --examples - name: check build serde,macos_kqueue - if: matrix.version == '1.60.0' && matrix.os == 'macos-latest' + if: matrix.version == '1.63.0' && matrix.os == 'macos-latest' run: cargo check -p notify --features=serde,macos_kqueue - name: check build serde for examples - if: matrix.version != '1.60.0' && matrix.os != 'macos-latest' + if: matrix.version != '1.63.0' && matrix.os != 'macos-latest' run: cargo check -p notify --features=serde --examples - name: check build serde - if: matrix.version == '1.60.0' && matrix.os != 'macos-latest' + if: matrix.version == '1.63.0' && matrix.os != 'macos-latest' run: cargo check --features=serde - name: check build without crossbeam/default features diff --git a/notify-debouncer-full/Cargo.toml b/notify-debouncer-full/Cargo.toml index 2fd08a09..2fb624d9 100644 --- a/notify-debouncer-full/Cargo.toml +++ b/notify-debouncer-full/Cargo.toml @@ -2,7 +2,7 @@ name = "notify-debouncer-full" version = "0.3.1" edition = "2021" -rust-version = "1.60" +rust-version = "1.63" description = "notify event debouncer optimized for ease of use" documentation = "https://docs.rs/notify-debouncer-full" homepage = "https://github.com/notify-rs/notify" diff --git a/notify-debouncer-mini/Cargo.toml b/notify-debouncer-mini/Cargo.toml index 030c73f8..12a96c14 100644 --- a/notify-debouncer-mini/Cargo.toml +++ b/notify-debouncer-mini/Cargo.toml @@ -2,7 +2,7 @@ name = "notify-debouncer-mini" version = "0.4.1" edition = "2021" -rust-version = "1.60" +rust-version = "1.63" description = "notify mini debouncer for events" documentation = "https://docs.rs/notify-debouncer-mini" homepage = "https://github.com/notify-rs/notify" diff --git a/notify/Cargo.toml b/notify/Cargo.toml index 4a2084c4..97108b9c 100644 --- a/notify/Cargo.toml +++ b/notify/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "notify" version = "6.1.1" -rust-version = "1.60" +rust-version = "1.63" description = "Cross-platform filesystem notification library" documentation = "https://docs.rs/notify" homepage = "https://github.com/notify-rs/notify" @@ -27,7 +27,7 @@ serde = { version = "1.0.89", features = ["derive"], optional = true } walkdir = "2.2.2" [target.'cfg(any(target_os="linux", target_os="android"))'.dependencies] -inotify = { version = "0.9", default-features = false } +inotify = { version = "0.10", default-features = false } mio = { version = "0.8", features = ["os-ext"] } [target.'cfg(target_os="macos")'.dependencies] diff --git a/notify/src/inotify.rs b/notify/src/inotify.rs index d8d81401..7344e6ab 100644 --- a/notify/src/inotify.rs +++ b/notify/src/inotify.rs @@ -307,9 +307,11 @@ impl EventLoop { } } None => { - log::trace!("No patch for DELETE_SELF event, may be a bug?"); + log::trace!( + "No patch for DELETE_SELF event, may be a bug?" + ); RemoveKind::Other - }, + } }; evs.push( Event::new(EventKind::Remove(remove_kind)) @@ -430,7 +432,7 @@ impl EventLoop { if let Some(ref mut inotify) = self.inotify { log::trace!("adding inotify watch: {}", path.display()); - match inotify.add_watch(&path, watchmask) { + match inotify.watches().add(&path, watchmask) { Err(e) => { Err(if e.raw_os_error() == Some(libc::ENOSPC) { // do not report inotify limits as "no more space" on linux #266 @@ -462,7 +464,8 @@ impl EventLoop { log::trace!("removing inotify watch: {}", path.display()); inotify - .rm_watch(w.clone()) + .watches() + .remove(w.clone()) .map_err(|e| Error::io(e).add_path(path.clone()))?; self.paths.remove(&w); @@ -471,7 +474,8 @@ impl EventLoop { for (w, p) in &self.paths { if p.starts_with(&path) { inotify - .rm_watch(w.clone()) + .watches() + .remove(w.clone()) .map_err(|e| Error::io(e).add_path(p.into()))?; self.watches.remove(p); remove_list.push(w.clone()); @@ -491,7 +495,8 @@ impl EventLoop { if let Some(ref mut inotify) = self.inotify { for (w, p) in &self.paths { inotify - .rm_watch(w.clone()) + .watches() + .remove(w.clone()) .map_err(|e| Error::io(e).add_path(p.into()))?; } self.watches.clear();