I do have many issues with rustfmt making odd choices, but I haven't found any configuration that makes it better.
What I do instead is from time to time I apply rustfmt and only selectively keep changes that make sense (with a git client that has a gui for
git add -p).
The problem is that rustfmt wants to make a "canonical" version of formatting, so it ignores how code looked before.
My main gripe is that
rustfmt will actively work on making short lines longer, which makes spaghetti code. But lowering line length limit forces it to wrap a lot more, and it's not good at wrapping. There's no option to "keep short lines as they are, only wrap lines that are too long".
If I write (imagine this example is closer to 80-column lines)
let foo = bar.try_something()
If I allow long lines, it will be actively unwrapped to be as long as possible, which hurts readability:
let foo = bar.try_something().or_else(handle_error)?
If I ask for shorter lines, I can only get this weird hiccup:
let foo =
or it explodes vertically:
let foo = bar
There's no option in rustfmt to tell it to leave it as it was, with success case on one line, and error handling on the other.