@@ -27,9 +27,7 @@ mod chain;
2727mod cloned;
2828mod cmp;
2929mod copied;
30- mod count;
3130mod cycle;
32- mod delay;
3331mod enumerate;
3432mod eq;
3533mod filter;
@@ -49,7 +47,6 @@ mod map;
4947mod max;
5048mod max_by;
5149mod max_by_key;
52- mod merge;
5350mod min;
5451mod min_by;
5552mod min_by_key;
@@ -64,17 +61,13 @@ mod skip_while;
6461mod step_by;
6562mod take;
6663mod take_while;
67- mod throttle;
68- mod timeout;
6964mod try_fold;
7065mod try_for_each;
71- mod unzip;
7266mod zip;
7367
7468use all:: AllFuture ;
7569use any:: AnyFuture ;
7670use cmp:: CmpFuture ;
77- use count:: CountFuture ;
7871use cycle:: Cycle ;
7972use enumerate:: Enumerate ;
8073use eq:: EqFuture ;
@@ -101,33 +94,46 @@ use partial_cmp::PartialCmpFuture;
10194use position:: PositionFuture ;
10295use try_fold:: TryFoldFuture ;
10396use try_for_each:: TryForEachFuture ;
104- use unzip:: UnzipFuture ;
10597
10698pub use chain:: Chain ;
10799pub use cloned:: Cloned ;
108100pub use copied:: Copied ;
109- pub use delay:: Delay ;
110101pub use filter:: Filter ;
111102pub use fuse:: Fuse ;
112103pub use inspect:: Inspect ;
113104pub use map:: Map ;
114- pub use merge:: Merge ;
115105pub use scan:: Scan ;
116106pub use skip:: Skip ;
117107pub use skip_while:: SkipWhile ;
118108pub use step_by:: StepBy ;
119109pub use take:: Take ;
120110pub use take_while:: TakeWhile ;
121- pub use throttle:: Throttle ;
122- pub use timeout:: { Timeout , TimeoutError } ;
123111pub use zip:: Zip ;
124112
125113use core:: cmp:: Ordering ;
126- use core:: future:: Future ;
127- use core:: pin:: Pin ;
128- use core:: time:: Duration ;
129114
130- use crate :: stream:: { Product , Sum } ;
115+ cfg_std ! {
116+ use core:: time:: Duration ;
117+ use crate :: stream:: { Product , Sum } ;
118+ use alloc:: boxed:: Box ;
119+ use core:: future:: Future ;
120+ use core:: pin:: Pin ;
121+
122+ use unzip:: UnzipFuture ;
123+ use count:: CountFuture ;
124+
125+ pub use throttle:: Throttle ;
126+ pub use merge:: Merge ;
127+ pub use delay:: Delay ;
128+ pub use timeout:: { Timeout , TimeoutError } ;
129+
130+ mod timeout;
131+ mod throttle;
132+ mod merge;
133+ mod delay;
134+ mod unzip;
135+ mod count;
136+ }
131137
132138cfg_unstable ! {
133139 use crate :: stream:: FromStream ;
@@ -357,6 +363,7 @@ extension_trait! {
357363 # }) }
358364 ```
359365 "# ]
366+ #[ cfg( feature = "std" ) ]
360367 fn throttle( self , d: Duration ) -> Throttle <Self >
361368 where
362369 Self : Sized ,
@@ -598,6 +605,7 @@ extension_trait! {
598605 # }) }
599606 ```
600607 "# ]
608+ #[ cfg( feature = "std" ) ]
601609 fn delay( self , dur: std:: time:: Duration ) -> Delay <Self >
602610 where
603611 Self : Sized ,
@@ -1652,6 +1660,7 @@ extension_trait! {
16521660 # Ok(()) }) }
16531661 ```
16541662 "# ]
1663+ #[ cfg( feature = "std" ) ]
16551664 fn timeout( self , dur: Duration ) -> Timeout <Self >
16561665 where
16571666 Self : Stream + Sized ,
@@ -1816,6 +1825,7 @@ extension_trait! {
18161825 # }) }
18171826 ```
18181827 "# ]
1828+ #[ cfg( feature = "std" ) ]
18191829 fn unzip<A , B , FromA , FromB >( self ) -> impl Future <Output = ( FromA , FromB ) > [ UnzipFuture <Self , FromA , FromB >]
18201830 where
18211831 FromA : Default + Extend <A >,
@@ -1913,6 +1923,7 @@ extension_trait! {
19131923 # });
19141924 ```
19151925 "# ]
1926+ #[ cfg( feature = "std" ) ]
19161927 fn merge<U >( self , other: U ) -> Merge <Self , U >
19171928 where
19181929 Self : Sized ,
@@ -2058,6 +2069,7 @@ extension_trait! {
20582069 # }) }
20592070 ```
20602071 "# ]
2072+ #[ cfg( feature = "std" ) ]
20612073 fn count( self ) -> impl Future <Output = usize > [ CountFuture <Self >]
20622074 where
20632075 Self : Sized ,
@@ -2318,6 +2330,7 @@ extension_trait! {
23182330 # }) }
23192331 ```
23202332 "# ]
2333+ #[ cfg( feature = "std" ) ]
23212334 fn sum<' a, S >(
23222335 self ,
23232336 ) -> impl Future <Output = S > + ' a [ Pin <Box <dyn Future <Output = S > + ' a>>]
@@ -2362,6 +2375,7 @@ extension_trait! {
23622375 # }) }
23632376 ```
23642377 "# ]
2378+ #[ cfg( feature = "std" ) ]
23652379 fn product<' a, P >(
23662380 self ,
23672381 ) -> impl Future <Output = P > + ' a [ Pin <Box <dyn Future <Output = P > + ' a>>]
0 commit comments