I often have code like
if condition {
// code that deserves to
// be formatted as block
}
else { None } // or some other trivial expression
Now, is there a way to prevent rustfmt from wasting two lines formatting the trivial else part like this:
else {
None
}
Note that single_line_if_else_maxwidth
doesn't help, as the "then" part is too long.