tokio: include async-traits feature (#1314)

The `tokio` facade crate will depend on the `async-traits` feature flag in
sub crates.
This commit is contained in:
Jon Gjengset 2019-07-15 17:02:15 -04:00 committed by Carl Lerche
parent b14e189e44
commit e6cf976662
5 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ jobs:
tokio-reactor: []
tokio-signal: []
tokio-tcp:
- incoming
- async-traits
# - tokio-tls
tokio-udp: []
tokio-uds:

View File

@ -22,7 +22,7 @@ categories = ["asynchronous"]
publish = false
[features]
incoming = []
async-traits = []
[dependencies]
async-util = { git = "https://github.com/tokio-rs/async" }

View File

@ -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;

View File

@ -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<dyn std::error::Error>>(())
/// ```
#[cfg(feature = "incoming")]
#[cfg(feature = "async-traits")]
pub fn incoming(self) -> Incoming {
Incoming::new(self)
}

View File

@ -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 }