mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
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:
parent
b14e189e44
commit
e6cf976662
@ -34,7 +34,7 @@ jobs:
|
||||
tokio-reactor: []
|
||||
tokio-signal: []
|
||||
tokio-tcp:
|
||||
- incoming
|
||||
- async-traits
|
||||
# - tokio-tls
|
||||
tokio-udp: []
|
||||
tokio-uds:
|
||||
|
@ -22,7 +22,7 @@ categories = ["asynchronous"]
|
||||
publish = false
|
||||
|
||||
[features]
|
||||
incoming = []
|
||||
async-traits = []
|
||||
|
||||
[dependencies]
|
||||
async-util = { git = "https://github.com/tokio-rs/async" }
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user