mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
util: anotate time module as requiring time feature (#3606)
Signed-off-by: Zahari Dichev <[email protected]>
This commit is contained in:
@@ -47,3 +47,13 @@ macro_rules! cfg_rt {
|
|||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro_rules! cfg_time {
|
||||||
|
($($item:item)*) => {
|
||||||
|
$(
|
||||||
|
#[cfg(feature = "time")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "time")))]
|
||||||
|
$item
|
||||||
|
)*
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -45,13 +45,14 @@ cfg_rt! {
|
|||||||
pub mod context;
|
pub mod context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cfg_time! {
|
||||||
|
pub mod time;
|
||||||
|
}
|
||||||
|
|
||||||
pub mod sync;
|
pub mod sync;
|
||||||
|
|
||||||
pub mod either;
|
pub mod either;
|
||||||
|
|
||||||
#[cfg(feature = "time")]
|
|
||||||
pub mod time;
|
|
||||||
|
|
||||||
#[cfg(any(feature = "io", feature = "codec"))]
|
#[cfg(any(feature = "io", feature = "codec"))]
|
||||||
mod util {
|
mod util {
|
||||||
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
|
||||||
|
|||||||
Reference in New Issue
Block a user