Fix rest of `clippy` errors and warnings and `#![deny(clippy::all)]`
Opened this issue · 0 comments
kkysen commented
Right now we specify #![allow(clippy::all)]
, as we only want to lint against the most important safety lints:
#![deny(clippy::undocumented_unsafe_blocks)]
#![deny(clippy::missing_safety_doc)]
We'd like to run many more clippy
lints of course, but only the safety-related ones were a priority.
A few lints we want to skip, though:
-
#![allow(clippy::needless_range_loop)]
We've paid careful attention to the performance of indexing loops, so places where an index is used instead of an iterator is done purposefully. When pre-sliced, the indexing version is often easier for LLVM to optimize. -
#![allow(clippy::too_many_arguments)]
Some other lints that we do want, but aren't enabled by default:
#![deny(clippy::cast_lossless)]
: See #1245.