There's a part of me which just wants to do cargo fmt && git commit -a -m "Run rust-fmt" && git push
I really hate some of the things rustfmt does, such as removing the linebreaks at the start of functions. I feel like this reduces the visibility of the leading comments in functions:
fn foo(&self, number: i32, string: String) {
// Try the different parameter orders
bar(number, string);
bar(string, number);
}
fn foo(&self, number: i32, string: String) {
// Try the different parameter orders
bar(number, string);
bar(string, number);
}
On the other hand, having ´cargo fmt´ as the baseline for all changes and (somewhat) blindly following its defaults removes most of the style arguments.
For example personally I'm in favor of the "spaces within parens" rules, etc. as I feel they provide a bette visual break between the function and the parameters - however I'm pretty sure I can personally get similar effect by changing the color scheme of my editor to reduce the brightness of various brackets.
There's a part of me which just wants to do
cargo fmt && git commit -a -m "Run rust-fmt" && git push
I really hate some of the things rustfmt does, such as removing the linebreaks at the start of functions. I feel like this reduces the visibility of the leading comments in functions:
On the other hand, having ´cargo fmt´ as the baseline for all changes and (somewhat) blindly following its defaults removes most of the style arguments.
For example personally I'm in favor of the "spaces within parens" rules, etc. as I feel they provide a bette visual break between the function and the parameters - however I'm pretty sure I can personally get similar effect by changing the color scheme of my editor to reduce the brightness of various brackets.