From e6cf976662d21974f69fa7d4d60fb27b887c6c47 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Mon, 15 Jul 2019 17:02:15 -0400 Subject: [PATCH] tokio: include `async-traits` feature (#1314) The `tokio` facade crate will depend on the `async-traits` feature flag in sub crates. --- azure-pipelines.yml | 2 +- tokio-tcp/Cargo.toml | 2 +- tokio-tcp/src/lib.rs | 2 +- tokio-tcp/src/listener.rs | 4 ++-- tokio/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2e815d2de..7f53d44d6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,7 +34,7 @@ jobs: tokio-reactor: [] tokio-signal: [] tokio-tcp: - - incoming + - async-traits # - tokio-tls tokio-udp: [] tokio-uds: diff --git a/tokio-tcp/Cargo.toml b/tokio-tcp/Cargo.toml index 776f14b9a..f643831f3 100644 --- a/tokio-tcp/Cargo.toml +++ b/tokio-tcp/Cargo.toml @@ -22,7 +22,7 @@ categories = ["asynchronous"] publish = false [features] -incoming = [] +async-traits = [] [dependencies] async-util = { git = "https://github.com/tokio-rs/async" } diff --git a/tokio-tcp/src/lib.rs b/tokio-tcp/src/lib.rs index 3a8e04b30..cddaaa95a 100644 --- a/tokio-tcp/src/lib.rs +++ b/tokio-tcp/src/lib.rs @@ -23,7 +23,7 @@ //! [incoming_method]: struct.TcpListener.html#method.incoming //! [`Incoming`]: struct.Incoming.html -#[cfg(feature = "incoming")] +#[cfg(feature = "async-traits")] mod incoming; mod listener; pub mod split; diff --git a/tokio-tcp/src/listener.rs b/tokio-tcp/src/listener.rs index 8fa1b4bce..c5b765244 100644 --- a/tokio-tcp/src/listener.rs +++ b/tokio-tcp/src/listener.rs @@ -1,4 +1,4 @@ -#[cfg(feature = "incoming")] +#[cfg(feature = "async-traits")] use super::incoming::Incoming; use super::TcpStream; use futures_core::ready; @@ -288,7 +288,7 @@ impl TcpListener { /// }); /// # Ok::<_, Box>(()) /// ``` - #[cfg(feature = "incoming")] + #[cfg(feature = "async-traits")] pub fn incoming(self) -> Incoming { Incoming::new(self) } diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 6a630083d..6908950e7 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -76,7 +76,7 @@ tokio-macros = { version = "0.2.0", optional = true, path = "../tokio-macros" } tokio-reactor = { version = "0.2.0", optional = true, path = "../tokio-reactor" } tokio-sync = { version = "0.2.0", optional = true, path = "../tokio-sync", features = ["async-traits"] } tokio-threadpool = { version = "0.2.0", optional = true, path = "../tokio-threadpool" } -tokio-tcp = { version = "0.2.0", optional = true, path = "../tokio-tcp" } +tokio-tcp = { version = "0.2.0", optional = true, path = "../tokio-tcp", features = ["async-traits"] } tokio-udp = { version = "0.2.0", optional = true, path = "../tokio-udp" } tokio-timer = { version = "0.3.0", optional = true, path = "../tokio-timer" } tracing-core = { version = "0.1", optional = true }