Skip to content
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

chore: deprecate async-io support in mDNS crate #5958

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions protocols/mdns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ hickory-proto = { workspace = true, features = ["mdns"] }
[features]
tokio = ["dep:tokio", "if-watch/tokio"]
async-io = ["dep:async-io", "dep:async-std", "if-watch/smol"]
# async-io feature is deprecated and will be removed in a future release

[dev-dependencies]
async-std = { version = "1.9.0", features = ["attributes"] }
Expand Down
5 changes: 4 additions & 1 deletion protocols/mdns/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ pub trait Abort {
}

/// The type of a [`Behaviour`] using the `async-io` implementation.
#[cfg(feature = "async-io")]
#[cfg(feature = "async-io")]#[deprecated(
since = "0.47.0",
note = "async-io has been discontinued. Please use the tokio feature instead."
)]
pub mod async_io {
use std::future::Future;

Expand Down
4 changes: 4 additions & 0 deletions protocols/mdns/src/behaviour/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ pub trait AsyncSocket: Unpin + Send + 'static {
}

#[cfg(feature = "async-io")]
#[deprecated(
since = "0.47.0",
note = "async-io has been discontinued. Please use the tokio feature instead."
)]
pub(crate) mod asio {
use async_io::Async;
use futures::FutureExt;
Expand Down
4 changes: 4 additions & 0 deletions protocols/mdns/src/behaviour/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub trait Builder: Send + Unpin + 'static {
}

#[cfg(feature = "async-io")]
#[deprecated(
since = "0.47.0",
note = "async-io has been discontinued. Please use the tokio feature instead."
)]
pub(crate) mod asio {
use std::{
pin::Pin,
Expand Down
4 changes: 4 additions & 0 deletions protocols/mdns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ use std::{

mod behaviour;
#[cfg(feature = "async-io")]
#[deprecated(
since = "0.47.0",
note = "async-io has been discontinued. Please use the tokio feature instead."
)]
pub use crate::behaviour::async_io;
#[cfg(feature = "tokio")]
pub use crate::behaviour::tokio;
Expand Down