@@ -21,8 +21,8 @@ keyword. The stream block must return `()`.
21
21
``` rust
22
22
use async_stream :: stream;
23
23
24
- use futures_util :: pin_mut;
25
- use futures_util :: stream :: StreamExt ;
24
+ use futures :: pin_mut;
25
+ use futures :: stream :: StreamExt ;
26
26
27
27
#[tokio:: main]
28
28
async fn main () {
@@ -45,9 +45,9 @@ Streams may be returned by using `impl Stream<Item = T>`:
45
45
``` rust
46
46
use async_stream :: stream;
47
47
48
- use futures_core :: stream :: Stream ;
49
- use futures_util :: pin_mut;
50
- use futures_util :: stream :: StreamExt ;
48
+ use futures :: stream :: Stream ;
49
+ use futures :: pin_mut;
50
+ use futures :: stream :: StreamExt ;
51
51
52
52
fn zero_to_three () -> impl Stream <Item = u32 > {
53
53
stream! {
@@ -73,9 +73,9 @@ Streams may be implemented in terms of other streams:
73
73
``` rust
74
74
use async_stream :: stream;
75
75
76
- use futures_core :: stream :: Stream ;
77
- use futures_util :: pin_mut;
78
- use futures_util :: stream :: StreamExt ;
76
+ use futures :: stream :: Stream ;
77
+ use futures :: pin_mut;
78
+ use futures :: stream :: StreamExt ;
79
79
80
80
fn zero_to_three () -> impl Stream <Item = u32 > {
81
81
stream! {
@@ -115,7 +115,7 @@ of the returned stream is `Result` with `Ok` being the value yielded and
115
115
use tokio :: net :: {TcpListener , TcpStream };
116
116
117
117
use async_stream :: try_stream;
118
- use futures_core :: stream :: Stream ;
118
+ use futures :: stream :: Stream ;
119
119
120
120
use std :: io;
121
121
use std :: net :: SocketAddr ;
@@ -159,7 +159,7 @@ If large `stream!` blocks are used, the caller will be required to add
159
159
160
160
A ` stream! ` macro may only contain up to 64 macro invocations.
161
161
162
- [ `Stream ` ] : https://docs.rs/futures-core/*/futures_core/stream/trait.Stream.html
162
+ [ `stream ` ] : https://docs.rs/futures-core/*/futures_core/stream/trait.Stream.html
163
163
[ `proc-macro-hack` ] : https://github.com/dtolnay/proc-macro-hack/
164
164
165
165
## License
0 commit comments