Skip to content

Comment on Your Rust Clippy Config Should Be Stricter

Comments

Thats what i implemented for myself. I made myself pre commit hooks for running clippy nightly and deploying my standard lints(clippy and non-clippy). Thanks to jq-lang and the jq-wrapper tomlq it can even work around the lints/workspace.lints difference with little problems.

For myself i have forbidden unwrap/expect, since this can lead to panics. For cases where an unwrap IS unavoidable, i use unsafe {unwrap_unchecked}. The unsafe is to make sure i can't overlook it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.