From bdaa92848c77f4eaadbab5dc753e0ec0b84c5221 Mon Sep 17 00:00:00 2001 From: Liigo Zhuang Date: Mon, 8 Aug 2022 14:49:20 +0800 Subject: [PATCH] a fix about .await --- src/expressions/await-expr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/expressions/await-expr.md b/src/expressions/await-expr.md index b52cda1b9..feea1a368 100644 --- a/src/expressions/await-expr.md +++ b/src/expressions/await-expr.md @@ -16,7 +16,7 @@ More specifically, an await expression has the following effect. 2. Evaluate the future to a [future] `tmp`; 3. Pin `tmp` using [`Pin::new_unchecked`]; 4. This pinned future is then polled by calling the [`Future::poll`] method and passing it the current [task context](#task-context); -5. If the call to `poll` returns [`Poll::Pending`], then the future returns `Poll::Pending`, suspending its state so that, when the surrounding async context is re-polled,execution returns to step 2; +5. If the call to `poll` returns [`Poll::Pending`], then the future returns `Poll::Pending`, suspending its state so that, when the surrounding async context is re-polled,execution returns to step 3; 6. Otherwise the call to `poll` must have returned [`Poll::Ready`], in which case the value contained in the [`Poll::Ready`] variant is used as the result of the `await` expression itself. > **Edition differences**: Await expressions are only available beginning with Rust 2018.