Skip to content

Commit 9ccc104

Browse files
committed
style-guide: Add an additional chaining example
Make it clear the rule for stacking the second line on the first applies recursively, as long as the condition holds.
1 parent ce5aca9 commit 9ccc104

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,15 @@ let foo = bar
456456

457457
If the length of the last line of the first element plus its indentation is
458458
less than or equal to the indentation of the second line, then combine the
459-
first and second lines if they fit:
459+
first and second lines if they fit. Apply this rule recursively.
460460

461461
```rust
462462
x.baz?
463463
.qux()
464464

465+
x.y.z
466+
.qux()
467+
465468
let foo = x
466469
.baz?
467470
.qux();

0 commit comments

Comments
 (0)