rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Add option to avoid line break after the `=` in `let` statements

Open larry0x opened this issue 1 year ago • 1 comments

// suppose this exceeds max line width...
let value = my_function(param1, param2, param3, param4, param5);

// option 1
let value =
    my_function(param1, param2, param3, param4, param5);

// option 2
let value = my_function(
    param1,
    param2,
    param3,
    param4,
    param5,
);

In my opinion, option 1 is very ugly. Would be great if a new config option is added that enforces option 2.

larry0x avatar May 22 '24 22:05 larry0x

Seems related: https://github.com/rust-lang/rustfmt/issues/3514

larry0x avatar May 22 '24 22:05 larry0x