rustfmt
rustfmt copied to clipboard
[unstable option] force_multiline_blocks
Tracking issue for unstable option: force_multiline_blocks
Please, can this be stabilized? It's been 32 months.
(is there any way I can help?)
Right now it seems that when force_multiline_blocks is false (the default), it appears to operate logically as "force_singleline_blocks" = true.
I'll often have matches that look like:
match thing {
Thing::Foo => small_func(),
Thing::Bar => {
a_function();
b_function();
c_function()
}
}
But I'd like them to be formatted like so for consistency:
match thing {
Thing::Foo => {
one_func(),
}
Thing::Bar => {
a_function();
b_function();
c_function()
}
}
I could set force_multiline_blocks=true, but this will also force multiline even in places where I don't want it. It would be nice if there was something like "allow_multiline_blocks" that won't force it either way. That is, if the item was written multiline keep it as multiline; if it was written without multiline, keep it without multiline.