From f86ec8e2673c61a5e142b93800533eba7cf243eb Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 11 Jun 2023 08:45:16 -0700 Subject: [PATCH 1/2] FIx deprecated inotify function --- Cargo.toml | 2 +- examples/linux-inotify.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fc0e20c..a79ac92 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ signal-hook = "0.3" tempfile = "3" [target.'cfg(target_os = "linux")'.dev-dependencies] -inotify = { version = "0.10", default-features = false } +inotify = { version = "0.10.1", default-features = false } timerfd = "1" [target.'cfg(windows)'.dev-dependencies] diff --git a/examples/linux-inotify.rs b/examples/linux-inotify.rs index c168f63..376aff4 100644 --- a/examples/linux-inotify.rs +++ b/examples/linux-inotify.rs @@ -37,7 +37,10 @@ fn main() -> std::io::Result<()> { future::block_on(async { // Watch events in the current directory. let mut inotify = Async::new(Inotify::init()?)?; - inotify.get_mut().add_watch(".", WatchMask::ALL_EVENTS)?; + inotify + .get_mut() + .watches() + .add(".", WatchMask::ALL_EVENTS)?; println!("Watching for filesystem events in the current directory..."); println!("Try opening a file to trigger some events."); println!(); From 326490c5085acaf2bc6e0133ae4ca5839258a098 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 11 Jun 2023 08:48:52 -0700 Subject: [PATCH 2/2] Bump MSRV to 1.63 --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2227486..069f965 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: os: [ubuntu-latest, windows-latest] # When updating this, the reminder to update the minimum supported # Rust version in Cargo.toml. - rust: ['1.48'] + rust: ['1.63'] steps: - uses: actions/checkout@v3 - name: Install Rust diff --git a/Cargo.toml b/Cargo.toml index a79ac92..cdfcf12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ name = "async-io" version = "1.13.0" authors = ["Stjepan Glavina "] edition = "2018" -rust-version = "1.48" +rust-version = "1.63" description = "Async I/O and timers" license = "Apache-2.0 OR MIT" repository = "https://github.com/smol-rs/async-io"