Update text/3668-async-closure.md

whoops forgot a mut

Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
This commit is contained in:
Michael Goulet 2024-07-10 23:52:45 -04:00 committed by GitHub
parent 662654b36a
commit ee9b0cd5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ let closure = async || {
};
```
The closure captures `vec` with some `&'closure mut Vec<String>` which lives until the closure is dropped. Then every call to the closure reborrows that mutable reference `&'call Vec<String>` which lives until the future is dropped (e.g. `await`ed).
The closure captures `vec` with some `&'closure mut Vec<String>` which lives until the closure is dropped. Then every call to the closure reborrows that mutable reference `&'call mut Vec<String>` which lives until the future is dropped (e.g. `await`ed).
As another example: