Skip to content

Commit aa49c76

Browse files
authored
Merge pull request #3752 from po1onius/oversight-fix
Fix syntax error caused by missing curly braces in example code
2 parents 34c5c30 + 8082b81 commit aa49c76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/3668-async-closures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ let hr = async |x: &str| { do_something(x).await };
143143

144144
// They can capture values by move:
145145
let s = String::from("hello, world");
146-
let c = async move || do_something(&s).await };
146+
let c = async move || { do_something(&s).await };
147147
```
148148

149149
When called, they return an anonymous future type corresponding to the (not-yet-executed) body of the closure. These can be awaited like any other future.

0 commit comments

Comments
 (0)