I want to write a simple call to assert!
like this
assert!(idents.len() == 1, "Multi-part table references not supported");
But this keeps getting formatted to:
assert!(
idents.len() == 1,
"Multi-part table references not supported"
);
But I don't really like this particular formatting behavior; I'd like it to stay on one line. I tried setting the fn_call_width
in my rustfmt.toml
file to a higher number, but that didn't help. Note that my max_width
is still the default value (100
).
Does anybody know if there is a config I can set in the rustfmt.toml
that can get me the desired behavior?
Ahh, I just realized that changing the width settings, like
fn_call_width
won't change anything ifuse_small_heuristics
is set to"Default"
(which it is by default). I have to either douse_small_heuristics = "Off"
, or I have to increase mymax_width
(whichrustfmt
uses to compute settings likefn_call_width
whenuse_small_heuristics = "Default"
).