Skip to content

Commit 77a0419

Browse files
authored
Merge pull request #536 from async-rs/count-unstable
mark Stream::count as unstable
2 parents ce98834 + 30ff7b0 commit 77a0419

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/stream/stream/count.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use crate::task::{Context, Poll};
99
pin_project! {
1010
#[doc(hidden)]
1111
#[allow(missing_debug_implementations)]
12+
#[cfg(all(feature = "default", feature = "unstable"))]
13+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
1214
pub struct CountFuture<S> {
1315
#[pin]
1416
stream: S,

src/stream/stream/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ mod any;
2626
mod chain;
2727
mod cloned;
2828
mod cmp;
29-
mod count;
3029
mod copied;
3130
mod cycle;
3231
mod enumerate;
@@ -69,7 +68,6 @@ mod zip;
6968
use all::AllFuture;
7069
use any::AnyFuture;
7170
use cmp::CmpFuture;
72-
use count::CountFuture;
7371
use cycle::Cycle;
7472
use enumerate::Enumerate;
7573
use eq::EqFuture;
@@ -123,12 +121,14 @@ cfg_unstable! {
123121
use crate::stream::into_stream::IntoStream;
124122
use crate::stream::{FromStream, Product, Sum};
125123

124+
use count::CountFuture;
126125
pub use merge::Merge;
127126
pub use flatten::Flatten;
128127
pub use flat_map::FlatMap;
129128
pub use timeout::{TimeoutError, Timeout};
130129
pub use throttle::Throttle;
131130

131+
mod count;
132132
mod merge;
133133
mod flatten;
134134
mod flat_map;
@@ -1911,6 +1911,8 @@ extension_trait! {
19111911
# }) }
19121912
```
19131913
"#]
1914+
#[cfg(feature = "unstable")]
1915+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
19141916
fn count(self) -> impl Future<Output = usize> [CountFuture<Self>]
19151917
where
19161918
Self: Sized,

0 commit comments

Comments
 (0)