Skip to content

Commit 509fb7e

Browse files
authored
expt.closure.capture-mut-ref: make sentence more easy to understand
1 parent 18d4246 commit 509fb7e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/expressions/closure-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ r[expr.closure.capture-inference]
3838
Without the `move` keyword, the closure expression [infers how it captures each variable from its environment](../types/closure.md#capture-modes), preferring to capture by shared reference, effectively borrowing all outer variables mentioned inside the closure's body.
3939

4040
r[expr.closure.capture-mut-ref]
41-
If needed the compiler will infer that instead mutable references should be taken, or that the values should be moved or copied (depending on their type) from the environment.
41+
If needed, the compiler will instead infer that mutable references should be taken, or that the values should be moved or copied (depending on their type) from the environment.
4242

4343
r[expr.closure.capture-move]
4444
A closure can be forced to capture its environment by copying or moving values by prefixing it with the `move` keyword. This is often used to ensure that the closure's lifetime is `'static`.

0 commit comments

Comments
 (0)