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.
This commit is contained in:
Josh Triplett 2023-07-05 15:21:56 -07:00
parent ce5aca9f5a
commit 9ccc104d14

View File

@ -456,12 +456,15 @@ let foo = bar
If the length of the last line of the first element plus its indentation is
less than or equal to the indentation of the second line, then combine the
first and second lines if they fit:
first and second lines if they fit. Apply this rule recursively.
```rust
x.baz?
.qux()
x.y.z
.qux()
let foo = x
.baz?
.qux();