diff --git a/tokio-stream/src/lib.rs b/tokio-stream/src/lib.rs index ff465ddb92e..edc7e87df20 100644 --- a/tokio-stream/src/lib.rs +++ b/tokio-stream/src/lib.rs @@ -88,6 +88,9 @@ pub mod adapters { AllFuture, AnyFuture, Chain, Filter, FilterMap, FoldFuture, Fuse, Map, MapWhile, Merge, Next, Peekable, Skip, SkipWhile, Take, TakeWhile, Then, TryNext, }; + cfg_time! { + pub use crate::stream_ext::{ChunksTimeout, Timeout, TimeoutRepeating}; + } } cfg_time! { diff --git a/tokio-stream/src/stream_ext.rs b/tokio-stream/src/stream_ext.rs index e66d3e67c4d..5511c1adc8a 100644 --- a/tokio-stream/src/stream_ext.rs +++ b/tokio-stream/src/stream_ext.rs @@ -61,13 +61,13 @@ pub use peekable::Peekable; cfg_time! { pub(crate) mod timeout; pub(crate) mod timeout_repeating; - use timeout::Timeout; - use timeout_repeating::TimeoutRepeating; + pub use timeout::Timeout; + pub use timeout_repeating::TimeoutRepeating; use tokio::time::{Duration, Interval}; mod throttle; use throttle::{throttle, Throttle}; mod chunks_timeout; - use chunks_timeout::ChunksTimeout; + pub use chunks_timeout::ChunksTimeout; } /// An extension trait for the [`Stream`] trait that provides a variety of