mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
19 lines
397 B
Rust
19 lines
397 B
Rust
macro_rules! cfg_time {
|
|||
|
|
($($item:item)*) => {
|
||
|
|
$(
|
||
|
|
#[cfg(feature = "time")]
|
||
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "time")))]
|
||
|
|
$item
|
||
|
|
)*
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
macro_rules! ready {
|
||
|
|
($e:expr $(,)?) => {
|
||
|
|
match $e {
|
||
|
|
std::task::Poll::Ready(t) => t,
|
||
|
|
std::task::Poll::Pending => return std::task::Poll::Pending,
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|