@@ -52,14 +52,14 @@ pub trait Future01CompatExt: Future01 {
52
52
/// [`Future<Output = Result<T, E>>`](futures_core::future::Future).
53
53
///
54
54
/// ```
55
- /// #![feature(async_await, await_macro )]
55
+ /// #![feature(async_await)]
56
56
/// # futures::executor::block_on(async {
57
57
/// # // TODO: These should be all using `futures::compat`, but that runs up against Cargo
58
58
/// # // feature issues
59
59
/// use futures_util::compat::Future01CompatExt;
60
60
///
61
61
/// let future = futures_01::future::ok::<u32, ()>(1);
62
- /// assert_eq!(await!( future.compat()) , Ok(1));
62
+ /// assert_eq!(future.compat().await , Ok(1));
63
63
/// # });
64
64
/// ```
65
65
fn compat ( self ) -> Compat01As03 < Self >
@@ -79,15 +79,15 @@ pub trait Stream01CompatExt: Stream01 {
79
79
/// [`Stream<Item = Result<T, E>>`](futures_core::stream::Stream).
80
80
///
81
81
/// ```
82
- /// #![feature(async_await, await_macro )]
82
+ /// #![feature(async_await)]
83
83
/// # futures::executor::block_on(async {
84
84
/// use futures::stream::StreamExt;
85
85
/// use futures_util::compat::Stream01CompatExt;
86
86
///
87
87
/// let stream = futures_01::stream::once::<u32, ()>(Ok(1));
88
88
/// let mut stream = stream.compat();
89
- /// assert_eq!(await!( stream.next()) , Some(Ok(1)));
90
- /// assert_eq!(await!( stream.next()) , None);
89
+ /// assert_eq!(stream.next().await , Some(Ok(1)));
90
+ /// assert_eq!(stream.next().await , None);
91
91
/// # });
92
92
/// ```
93
93
fn compat ( self ) -> Compat01As03 < Self >
@@ -107,18 +107,18 @@ pub trait Sink01CompatExt: Sink01 {
107
107
/// [`Sink<SinkItem = T, SinkError = E>`](futures_sink::sink::Sink).
108
108
///
109
109
/// ```
110
- /// #![feature(async_await, await_macro )]
110
+ /// #![feature(async_await)]
111
111
/// # futures::executor::block_on(async {
112
112
/// use futures::{sink::SinkExt, stream::StreamExt};
113
113
/// use futures_util::compat::{Stream01CompatExt, Sink01CompatExt};
114
114
///
115
115
/// let (tx, rx) = futures_01::unsync::mpsc::channel(1);
116
116
/// let (mut tx, mut rx) = (tx.sink_compat(), rx.compat());
117
117
///
118
- /// await!( tx.send(1)) .unwrap();
118
+ /// tx.send(1).await .unwrap();
119
119
/// drop(tx);
120
- /// assert_eq!(await!( rx.next()) , Some(Ok(1)));
121
- /// assert_eq!(await!( rx.next()) , None);
120
+ /// assert_eq!(rx.next().await , Some(Ok(1)));
121
+ /// assert_eq!(rx.next().await , None);
122
122
/// # });
123
123
/// ```
124
124
fn sink_compat ( self ) -> Compat01As03Sink < Self , Self :: SinkItem >
@@ -356,7 +356,7 @@ mod io {
356
356
/// [`AsyncRead`](futures_io::AsyncRead).
357
357
///
358
358
/// ```
359
- /// #![feature(async_await, await_macro, impl_trait_in_bindings)]
359
+ /// #![feature(async_await, impl_trait_in_bindings)]
360
360
/// # futures::executor::block_on(async {
361
361
/// use futures::io::AsyncReadExt;
362
362
/// use futures_util::compat::AsyncRead01CompatExt;
@@ -366,7 +366,7 @@ mod io {
366
366
/// let mut reader: impl futures::io::AsyncRead + Unpin = reader.compat();
367
367
///
368
368
/// let mut output = Vec::with_capacity(12);
369
- /// await!( reader.read_to_end(&mut output)) .unwrap();
369
+ /// reader.read_to_end(&mut output).await .unwrap();
370
370
/// assert_eq!(output, input);
371
371
/// # });
372
372
/// ```
@@ -385,7 +385,7 @@ mod io {
385
385
/// [`AsyncWrite`](futures_io::AsyncWrite).
386
386
///
387
387
/// ```
388
- /// #![feature(async_await, await_macro, impl_trait_in_bindings)]
388
+ /// #![feature(async_await, impl_trait_in_bindings)]
389
389
/// # futures::executor::block_on(async {
390
390
/// use futures::io::AsyncWriteExt;
391
391
/// use futures_util::compat::AsyncWrite01CompatExt;
@@ -394,7 +394,7 @@ mod io {
394
394
/// let mut cursor = std::io::Cursor::new(Vec::with_capacity(12));
395
395
///
396
396
/// let mut writer = (&mut cursor).compat();
397
- /// await!( writer.write_all(input)) .unwrap();
397
+ /// writer.write_all(input).await .unwrap();
398
398
///
399
399
/// assert_eq!(cursor.into_inner(), input);
400
400
/// # });
0 commit comments