Skip to content

Commit 9539af8

Browse files
committed
Clarify guide for unbraced closures: grammatical consistency
1 parent 2fc1de3 commit 9539af8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/style-guide/src/expressions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ expression of the closure. Between the `|`s, use function definition syntax,
125125
but elide types where possible.
126126

127127
Use closures without the enclosing `{}`, if possible. Add the `{}` when you have
128-
a return type, when there are statements, there are comments in the body, or the
129-
body expression spans multiple lines and is a control-flow expression. If using
130-
braces, follow the rules above for blocks. Examples:
128+
a return type, when there are statements, when there are comments in the body,
129+
or when the body expression spans multiple lines and is a control-flow
130+
expression. If using braces, follow the rules above for blocks. Examples:
131131

132132
```rust
133133
|arg1, arg2| expr

0 commit comments

Comments
 (0)