diff options
author | Carl Lerche <me@carllerche.com> | 2020-11-11 09:28:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 09:28:21 -0800 |
commit | ce891a4df17e632f7557dd0cd1f1e8da89bd6ae4 (patch) | |
tree | fa5478c0b3bacacfc65bfbadbe1cdb92234d5b5f /tokio/src/macros | |
parent | d869e16990c5fc2cbda48b036708efa4b450e807 (diff) |
io: driver internal cleanup (#3124)
* Removes duplicated code by moving it to `Registration`.
* impl `Deref` for `PollEvented` to avoid `get_ref()`.
* Avoid extra waker clones in I/O driver.
* Add `Interest` wrapper around `mio::Interest`.
Diffstat (limited to 'tokio/src/macros')
-rw-r--r-- | tokio/src/macros/cfg.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tokio/src/macros/cfg.rs b/tokio/src/macros/cfg.rs index 27929119..edf681a4 100644 --- a/tokio/src/macros/cfg.rs +++ b/tokio/src/macros/cfg.rs @@ -1,5 +1,18 @@ #![allow(unused_macros)] +macro_rules! feature { + ( + #![$meta:meta] + $($item:item)* + ) => { + $( + #[cfg($meta)] + #[cfg_attr(docsrs, doc(cfg($meta)))] + $item + )* + } +} + /// Enables enter::block_on macro_rules! cfg_block_on { ($($item:item)*) => { |