diff options
author | Ivan Petkov <ivanppetkov@gmail.com> | 2020-09-24 13:14:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-24 20:14:39 +0000 |
commit | ffa5bdb22db066b531e45b42d0cb236c3916eee2 (patch) | |
tree | 8c7b1aecbe73f4730b382968974e8aad45af5770 /tokio | |
parent | a1d0681cd2e581b1f6767126858d2f3d5d8992f5 (diff) |
chore: remove internal io-readiness cargo feature (#2878)
Diffstat (limited to 'tokio')
-rw-r--r-- | tokio/Cargo.toml | 5 | ||||
-rw-r--r-- | tokio/src/io/driver/scheduled_io.rs | 9 | ||||
-rw-r--r-- | tokio/src/macros/cfg.rs | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 0296e279..4d8edf63 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -51,7 +51,6 @@ blocking = ["rt-core"] dns = ["rt-core"] fs = ["rt-core", "io-util"] io-driver = ["mio", "lazy_static"] # internal only -io-readiness = [] # internal only io-util = ["memchr"] # stdin, stdout, stderr io-std = ["rt-core"] @@ -86,8 +85,8 @@ sync = ["fnv"] test-util = [] tcp = ["io-driver", "iovec"] time = ["slab"] -udp = ["io-driver", "io-readiness"] -uds = ["io-driver", "io-readiness", "mio-uds", "libc"] +udp = ["io-driver"] +uds = ["io-driver", "mio-uds", "libc"] [dependencies] tokio-macros = { version = "0.3.0", path = "../tokio-macros", optional = true } diff --git a/tokio/src/io/driver/scheduled_io.rs b/tokio/src/io/driver/scheduled_io.rs index 48c56a19..3e7d9570 100644 --- a/tokio/src/io/driver/scheduled_io.rs +++ b/tokio/src/io/driver/scheduled_io.rs @@ -26,12 +26,13 @@ pub(crate) struct ScheduledIo { waiters: Mutex<Waiters>, } -#[cfg(feature = "io-readiness")] -type WaitList = LinkedList<Waiter, <Waiter as linked_list::Link>::Target>; +cfg_io_readiness! { + type WaitList = LinkedList<Waiter, <Waiter as linked_list::Link>::Target>; +} #[derive(Debug, Default)] struct Waiters { - #[cfg(feature = "io-readiness")] + #[cfg(any(feature = "udp", feature = "uds"))] /// List of all current waiters list: WaitList, @@ -208,7 +209,7 @@ impl ScheduledIo { } } - #[cfg(feature = "io-readiness")] + #[cfg(any(feature = "udp", feature = "uds"))] { // check list of waiters for waiter in waiters diff --git a/tokio/src/macros/cfg.rs b/tokio/src/macros/cfg.rs index aa8dd675..447d81ef 100644 --- a/tokio/src/macros/cfg.rs +++ b/tokio/src/macros/cfg.rs @@ -146,7 +146,7 @@ macro_rules! cfg_not_io_driver { macro_rules! cfg_io_readiness { ($($item:item)*) => { $( - #[cfg(feature = "io-readiness")] + #[cfg(any(feature = "udp", feature = "uds"))] $item )* } |