Skip to content

Commit

Permalink
stream: expose the streams gated by the time feature
Browse files Browse the repository at this point in the history
Added an export for the three last stream structures in the
adapters mod.
Timeout was already exposed in tokio_stream directly due to
#4601 ; left it there.

Fixes: #6656
  • Loading branch information
sharpened-nacho committed Jun 30, 2024
1 parent 856933e commit 5f30b98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tokio-stream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down
6 changes: 3 additions & 3 deletions tokio-stream/src/stream_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f30b98

Please sign in to comment.