Just added a new Rust clippy lint inverted_saturating_sub
and extended implicit_saturating_sub
.
Some rare cases but hopefully it'll help find some logic bugs in some code bases. :)
PR: https://github.com/rust-lang/rust-clippy/pull/12476
Extend `implicit_saturating_sub` lint by GuillaumeGomez · Pull Request #12476 · rust-lang/rust-clippy
Fixes #10070. It can serve as base if we want to add equivalent checks for other arithmetic operations. Also one important note: when writing this lint, I realized that I could check for wrong cond...GitHub
Adrian Tombu 🦄
in reply to Guillaume Gomez • • •Guillaume Gomez
in reply to Adrian Tombu 🦄 • • •Adrian Tombu 🦄
in reply to Guillaume Gomez • • •