diff --git a/tokio-stream/src/lib.rs b/tokio-stream/src/lib.rs index f600ccb8d..7103075e8 100644 --- a/tokio-stream/src/lib.rs +++ b/tokio-stream/src/lib.rs @@ -77,6 +77,9 @@ pub mod wrappers; mod stream_ext; pub use stream_ext::{collect::FromStream, StreamExt}; +cfg_time! { + pub use stream_ext::timeout::Elapsed; +} mod empty; pub use empty::{empty, Empty}; diff --git a/tokio-stream/src/stream_ext.rs b/tokio-stream/src/stream_ext.rs index b79883bd6..a7bc2044f 100644 --- a/tokio-stream/src/stream_ext.rs +++ b/tokio-stream/src/stream_ext.rs @@ -56,7 +56,7 @@ mod try_next; use try_next::TryNext; cfg_time! { - mod timeout; + pub(crate) mod timeout; use timeout::Timeout; use tokio::time::Duration; mod throttle;