@@ -27,9 +27,7 @@ mod chain;
27
27
mod cloned;
28
28
mod cmp;
29
29
mod copied;
30
- mod count;
31
30
mod cycle;
32
- mod delay;
33
31
mod enumerate;
34
32
mod eq;
35
33
mod filter;
@@ -49,7 +47,6 @@ mod map;
49
47
mod max;
50
48
mod max_by;
51
49
mod max_by_key;
52
- mod merge;
53
50
mod min;
54
51
mod min_by;
55
52
mod min_by_key;
@@ -64,17 +61,13 @@ mod skip_while;
64
61
mod step_by;
65
62
mod take;
66
63
mod take_while;
67
- mod throttle;
68
- mod timeout;
69
64
mod try_fold;
70
65
mod try_for_each;
71
- mod unzip;
72
66
mod zip;
73
67
74
68
use all:: AllFuture ;
75
69
use any:: AnyFuture ;
76
70
use cmp:: CmpFuture ;
77
- use count:: CountFuture ;
78
71
use cycle:: Cycle ;
79
72
use enumerate:: Enumerate ;
80
73
use eq:: EqFuture ;
@@ -101,33 +94,46 @@ use partial_cmp::PartialCmpFuture;
101
94
use position:: PositionFuture ;
102
95
use try_fold:: TryFoldFuture ;
103
96
use try_for_each:: TryForEachFuture ;
104
- use unzip:: UnzipFuture ;
105
97
106
98
pub use chain:: Chain ;
107
99
pub use cloned:: Cloned ;
108
100
pub use copied:: Copied ;
109
- pub use delay:: Delay ;
110
101
pub use filter:: Filter ;
111
102
pub use fuse:: Fuse ;
112
103
pub use inspect:: Inspect ;
113
104
pub use map:: Map ;
114
- pub use merge:: Merge ;
115
105
pub use scan:: Scan ;
116
106
pub use skip:: Skip ;
117
107
pub use skip_while:: SkipWhile ;
118
108
pub use step_by:: StepBy ;
119
109
pub use take:: Take ;
120
110
pub use take_while:: TakeWhile ;
121
- pub use throttle:: Throttle ;
122
- pub use timeout:: { Timeout , TimeoutError } ;
123
111
pub use zip:: Zip ;
124
112
125
113
use core:: cmp:: Ordering ;
126
- use core:: future:: Future ;
127
- use core:: pin:: Pin ;
128
- use core:: time:: Duration ;
129
114
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
+ }
131
137
132
138
cfg_unstable ! {
133
139
use crate :: stream:: FromStream ;
@@ -357,6 +363,7 @@ extension_trait! {
357
363
# }) }
358
364
```
359
365
"# ]
366
+ #[ cfg( feature = "std" ) ]
360
367
fn throttle( self , d: Duration ) -> Throttle <Self >
361
368
where
362
369
Self : Sized ,
@@ -598,6 +605,7 @@ extension_trait! {
598
605
# }) }
599
606
```
600
607
"# ]
608
+ #[ cfg( feature = "std" ) ]
601
609
fn delay( self , dur: std:: time:: Duration ) -> Delay <Self >
602
610
where
603
611
Self : Sized ,
@@ -1652,6 +1660,7 @@ extension_trait! {
1652
1660
# Ok(()) }) }
1653
1661
```
1654
1662
"# ]
1663
+ #[ cfg( feature = "std" ) ]
1655
1664
fn timeout( self , dur: Duration ) -> Timeout <Self >
1656
1665
where
1657
1666
Self : Stream + Sized ,
@@ -1816,6 +1825,7 @@ extension_trait! {
1816
1825
# }) }
1817
1826
```
1818
1827
"# ]
1828
+ #[ cfg( feature = "std" ) ]
1819
1829
fn unzip<A , B , FromA , FromB >( self ) -> impl Future <Output = ( FromA , FromB ) > [ UnzipFuture <Self , FromA , FromB >]
1820
1830
where
1821
1831
FromA : Default + Extend <A >,
@@ -1913,6 +1923,7 @@ extension_trait! {
1913
1923
# });
1914
1924
```
1915
1925
"# ]
1926
+ #[ cfg( feature = "std" ) ]
1916
1927
fn merge<U >( self , other: U ) -> Merge <Self , U >
1917
1928
where
1918
1929
Self : Sized ,
@@ -2058,6 +2069,7 @@ extension_trait! {
2058
2069
# }) }
2059
2070
```
2060
2071
"# ]
2072
+ #[ cfg( feature = "std" ) ]
2061
2073
fn count( self ) -> impl Future <Output = usize > [ CountFuture <Self >]
2062
2074
where
2063
2075
Self : Sized ,
@@ -2318,6 +2330,7 @@ extension_trait! {
2318
2330
# }) }
2319
2331
```
2320
2332
"# ]
2333
+ #[ cfg( feature = "std" ) ]
2321
2334
fn sum<' a, S >(
2322
2335
self ,
2323
2336
) -> impl Future <Output = S > + ' a [ Pin <Box <dyn Future <Output = S > + ' a>>]
@@ -2362,6 +2375,7 @@ extension_trait! {
2362
2375
# }) }
2363
2376
```
2364
2377
"# ]
2378
+ #[ cfg( feature = "std" ) ]
2365
2379
fn product<' a, P >(
2366
2380
self ,
2367
2381
) -> impl Future <Output = P > + ' a [ Pin <Box <dyn Future <Output = P > + ' a>>]
0 commit comments