Open
Description
I ended up writing this feature request formatted like the Rustfmt options docs. Please let me know if more information is needed or if I somehow missed that this option already exists.
fn_chain_vertical_semicolon
Vertically wrap the semicolon at the end of a vertical function chain.
Pros
- Easier to visually scan the leftmost character to see when the method calls stop and the semicolon ends the statement.
- IDEs that support single-line commenting don't have to be corrected after commenting out the last line.
- e.g. in the
false
example, an IDE may replace.dolor();
with// .dolor();
and comment out the semicolon causing an error.
- e.g. in the
Cons
- Adds a basically empty line, making code taller than necessary.
- Default: I don't know how this is decided. As it is currently unimplemented, the default is
false
. - Possible Values:
true
,false
false
:
fn main() {
lorem
.ipsum()
.dolor();
}
true
:
fn main() {
lorem
.ipsum()
.dolor()
;
}