Simplify wording in guide for unbraced closures
This commit is contained in:
parent
9362ae1616
commit
9ea1180cc7
@ -126,8 +126,8 @@ but elide types where possible.
|
||||
|
||||
Use closures without the enclosing `{}`, if possible. Add the `{}` when you have
|
||||
a return type, when there are statements, when there are comments inside the
|
||||
closure, or when the body expression spans multiple lines and is a control-flow
|
||||
expression. If using braces, follow the rules above for blocks. Examples:
|
||||
closure, or when the body expression is a control-flow expression that spans
|
||||
multiple lines. If using braces, follow the rules above for blocks. Examples:
|
||||
|
||||
```rust
|
||||
|arg1, arg2| expr
|
||||
|
Loading…
Reference in New Issue
Block a user