Hacker News new | ask | show | jobs
by stonewareslord 1510 days ago
You can enable a ton more lints:

    #![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
This might be too annoying for some people, but you can choose to allow ones that don't matter and keep the rest.

Notably: it will warn for as truncation, integer arithmetic (a+b can panic or overflow; use checked_/wrapping_/saturating_), calling a function in unwrap_or, etc.

Lints: https://rust-lang.github.io/rust-clippy/master/index.html