Skip to content

Commit 139a34b

Browse files
committed
Make throttle an unstable feature
1 parent b591fc6 commit 139a34b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/stream/stream/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ mod skip_while;
6060
mod step_by;
6161
mod take;
6262
mod take_while;
63-
mod throttle;
6463
mod try_fold;
6564
mod try_for_each;
6665
mod zip;
@@ -107,16 +106,15 @@ pub use skip_while::SkipWhile;
107106
pub use step_by::StepBy;
108107
pub use take::Take;
109108
pub use take_while::TakeWhile;
110-
pub use throttle::Throttle;
111109
pub use zip::Zip;
112110

113111
use std::cmp::Ordering;
114112
use std::marker::PhantomData;
115-
use std::time::Duration;
116113

117114
cfg_unstable! {
118115
use std::future::Future;
119116
use std::pin::Pin;
117+
use std::time::Duration;
120118

121119
use crate::stream::into_stream::IntoStream;
122120
use crate::stream::{FromStream, Product, Sum};
@@ -125,11 +123,13 @@ cfg_unstable! {
125123
pub use flatten::Flatten;
126124
pub use flat_map::FlatMap;
127125
pub use timeout::{TimeoutError, Timeout};
126+
pub use throttle::Throttle;
128127

129128
mod merge;
130129
mod flatten;
131130
mod flat_map;
132131
mod timeout;
132+
mod throttle;
133133
}
134134

135135
extension_trait! {
@@ -315,6 +315,7 @@ extension_trait! {
315315
TakeWhile::new(self, predicate)
316316
}
317317

318+
#[cfg(all(feature = "default", feature = "unstable"))]
318319
#[doc = r#"
319320
Limit the amount of items yielded per timeslice in a stream.
320321

0 commit comments

Comments
 (0)