|
1 |
| -#![feature(async_await)] |
2 |
| - |
3 | 1 | //! Asynchronous stream of elements.
|
4 | 2 | //!
|
5 | 3 | //! Provides two macros, `stream!` and `try_stream!`, allowing the caller to
|
6 | 4 | //! define asynchronous streams of elements. These are implemented using `async`
|
7 |
| -//! & `await` notation. The `stream!` macro works using only |
8 |
| -//! `#[feature(async_await)]`. |
| 5 | +//! & `await` notation. The `stream!` macro works without unstable features. |
9 | 6 | //!
|
10 | 7 | //! The `stream!` macro returns an anonymous type implementing the [`Stream`]
|
11 | 8 | //! trait. The `Item` associated type is the type of the values yielded from the
|
|
20 | 17 | //! keyword. The stream block must return `()`.
|
21 | 18 | //!
|
22 | 19 | //! ```rust
|
23 |
| -//! #![feature(async_await)] |
24 |
| -//! |
25 | 20 | //! use tokio::prelude::*;
|
26 | 21 | //!
|
27 | 22 | //! use async_stream::stream;
|
|
46 | 41 | //! Streams may be returned by using `impl Stream<Item = T>`:
|
47 | 42 | //!
|
48 | 43 | //! ```rust
|
49 |
| -//! #![feature(async_await)] |
50 |
| -//! |
51 | 44 | //! use tokio::prelude::*;
|
52 | 45 | //!
|
53 | 46 | //! use async_stream::stream;
|
|
75 | 68 | //! Streams may be implemented in terms of other streams:
|
76 | 69 | //!
|
77 | 70 | //! ```rust
|
78 |
| -//! #![feature(async_await)] |
79 |
| -//! |
80 | 71 | //! use tokio::prelude::*;
|
81 | 72 | //!
|
82 | 73 | //! use async_stream::stream;
|
|
117 | 108 | //! `Err` the error type returned by `?`.
|
118 | 109 | //!
|
119 | 110 | //! ```rust
|
120 |
| -//! #![feature(async_await)] |
121 |
| -//! |
122 | 111 | //! use tokio::net::{TcpListener, TcpStream};
|
123 | 112 | //! use tokio::prelude::*;
|
124 | 113 | //!
|
@@ -197,8 +186,6 @@ pub mod reexport {
|
197 | 186 | /// # Examples
|
198 | 187 | ///
|
199 | 188 | /// ```rust
|
200 |
| -/// #![feature(async_await)] |
201 |
| -/// |
202 | 189 | /// use tokio::prelude::*;
|
203 | 190 | ///
|
204 | 191 | /// use async_stream::stream;
|
@@ -241,8 +228,6 @@ macro_rules! stream {
|
241 | 228 | /// # Examples
|
242 | 229 | ///
|
243 | 230 | /// ```rust
|
244 |
| -/// #![feature(async_await)] |
245 |
| -/// |
246 | 231 | /// use tokio::net::{TcpListener, TcpStream};
|
247 | 232 | /// use tokio::prelude::*;
|
248 | 233 | ///
|
|
0 commit comments