Skip to content

Commit 1af6795

Browse files
DominicLucioFranco
authored andcommitted
readme: update imports in examples (#20)
1 parent b8e6411 commit 1af6795

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ keyword. The stream block must return `()`.
2121
```rust
2222
use async_stream::stream;
2323

24-
use futures_util::pin_mut;
25-
use futures_util::stream::StreamExt;
24+
use futures::pin_mut;
25+
use futures::stream::StreamExt;
2626

2727
#[tokio::main]
2828
async fn main() {
@@ -45,9 +45,9 @@ Streams may be returned by using `impl Stream<Item = T>`:
4545
```rust
4646
use async_stream::stream;
4747

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;
5151

5252
fn zero_to_three() -> impl Stream<Item = u32> {
5353
stream! {
@@ -73,9 +73,9 @@ Streams may be implemented in terms of other streams:
7373
```rust
7474
use async_stream::stream;
7575

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;
7979

8080
fn zero_to_three() -> impl Stream<Item = u32> {
8181
stream! {
@@ -115,7 +115,7 @@ of the returned stream is `Result` with `Ok` being the value yielded and
115115
use tokio::net::{TcpListener, TcpStream};
116116

117117
use async_stream::try_stream;
118-
use futures_core::stream::Stream;
118+
use futures::stream::Stream;
119119

120120
use std::io;
121121
use std::net::SocketAddr;
@@ -159,7 +159,7 @@ If large `stream!` blocks are used, the caller will be required to add
159159

160160
A `stream!` macro may only contain up to 64 macro invocations.
161161

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
163163
[`proc-macro-hack`]: https://github.com/dtolnay/proc-macro-hack/
164164

165165
## License

0 commit comments

Comments
 (0)