Skip to content

Commit 512b85b

Browse files
committed
Clarify guide for unbraced closures, regarding comments
1 parent 59f936f commit 512b85b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guide/expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ closure. Between the `|`s, you should use function definition syntax, however,
122122
elide types where possible.
123123

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

129129
```rust

0 commit comments

Comments
 (0)