From 99065d4304dc34af3865df2abdf126c7eeb8d529 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 18 Nov 2024 15:00:07 +1300 Subject: [PATCH] Update src/part-guide/adv-async-await.md Co-authored-by: Travis Cross --- src/part-guide/adv-async-await.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/part-guide/adv-async-await.md b/src/part-guide/adv-async-await.md index 6163e8d9..e73c3b39 100644 --- a/src/part-guide/adv-async-await.md +++ b/src/part-guide/adv-async-await.md @@ -54,7 +54,7 @@ We'll be coming back to cancellation and cancellation safety a few times in this ## Async blocks -A regular block in Rust (`{ ... }`) groups code together in the source and creates a scope of encapsulation for names. At runtime, the block is executed in order and evaluates to the value of it's last expression (or void (`()`) if there is no trailing expression). +A regular block (`{ ... }`) groups code together in the source and creates a scope of encapsulation for names. At runtime, the block is executed in order and evaluates to the value of its last expression (or the unit type (`()`) if there is no trailing expression). Similarly to async functions, an async block is a deferred version of a regular block. An async block scopes code and names together, but at runtime it is not immediately executed and evaluates to a future. To execute the block and obtain the result, it must be `await`ed. E.g.,