Skip to content

Commit 9362ae1

Browse files
committed
Clarify guide for unbraced closures, regarding comments
1 parent 9539af8 commit 9362ae1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ 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, when there are comments in the body,
129-
or when the body expression spans multiple lines and is a control-flow
128+
a return type, when there are statements, when there are comments inside the
129+
closure, or when the body expression spans multiple lines and is a control-flow
130130
expression. If using braces, follow the rules above for blocks. Examples:
131131

132132
```rust

0 commit comments

Comments
 (0)