4 ms·
Rust sorta has a de-facto code style. It'd be interesting to add tooling to cargo to make it obvious how to comply with the evolved standard style for Rust.
by microcolonel 10y ago
Rust sorta has a de-facto code style. It'd be interesting to add tooling to cargo to make it obvious how to comply with the evolved standard style for Rust.
- kzrdude 10y agoSome of the format rfcs basically went against the most dominant style (for example where clauses), so things are changing around.
- hackcrafter 10y agoThere is definitely a changing Rust definition of good code hygiene in terms of how to write code in the most "Rustic" way, but in terms of code formatting, there is already rustfmt[0] [0] https://github.com/rust-lang-nursery/rustfmt https://github.com/rust-lang-nursery/rustfmt
- tveita 10y agoClippy has some checks for naming convention beyond what rustc and rustfmt does. Not nearly as much as https://github.com/brson/rust-api-guidelines https://github.com/brson/rust-api-guidelines, but the wrong_self_convention check helped me make sense of the as/to/into conventions. https://github.com/Manishearth/rust-clippy https://github.com/Manishearth/rust-clippy