Skip to content

Commit 6452940

Browse files
MajorBreakfastcramertj
authored andcommitted
Use normal closure and async block instead of async closure
1 parent 6e4eddb commit 6452940

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

futures-util/src/stream/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ pub trait StreamExt: Stream {
680680
/// # Examples
681681
///
682682
/// ```
683-
/// #![feature(async_await, async_closure)]
683+
/// #![feature(async_await)]
684684
/// # futures::executor::block_on(async {
685685
/// use futures::channel::oneshot;
686686
/// use futures::stream::{self, StreamExt};
@@ -691,7 +691,7 @@ pub trait StreamExt: Stream {
691691
///
692692
/// let fut = stream::iter(vec![rx1, rx2, rx3]).for_each_concurrent(
693693
/// /* limit */ 2,
694-
/// async move |rx| {
694+
/// |rx| async move {
695695
/// rx.await.unwrap();
696696
/// }
697697
/// );

futures-util/src/try_stream/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ pub trait TryStreamExt: TryStream {
396396
/// # Examples
397397
///
398398
/// ```
399-
/// #![feature(async_await, async_closure)]
399+
/// #![feature(async_await)]
400400
/// # futures::executor::block_on(async {
401401
/// use futures::channel::oneshot;
402402
/// use futures::stream::{self, StreamExt, TryStreamExt};
@@ -408,7 +408,7 @@ pub trait TryStreamExt: TryStream {
408408
/// let stream = stream::iter(vec![rx1, rx2, rx3]);
409409
/// let fut = stream.map(Ok).try_for_each_concurrent(
410410
/// /* limit */ 2,
411-
/// async move |rx| {
411+
/// |rx| async move {
412412
/// let res: Result<(), oneshot::Canceled> = rx.await;
413413
/// res
414414
/// }

0 commit comments

Comments
 (0)