Hacker News new | ask | show | jobs
by microcolonel 3336 days 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.
3 comments

There 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

Clippy has some checks for naming convention beyond what rustc and rustfmt does. Not nearly as much as 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

Some of the format rfcs basically went against the most dominant style (for example where clauses), so things are changing around.