Skip to content

Fix the deprecated function warning due to inotify #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "async-io"
version = "1.13.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
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"
Expand Down Expand Up @@ -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]
Expand Down
5 changes: 4 additions & 1 deletion examples/linux-inotify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!();
Expand Down