Closed 0xLucqs closed 2 months ago
Checks for expressions of the form x == true, x != true and order comparisons such as x < true (or vice versa) and suggest using the variable directly.
Unnecessary code.
if x == true {} if y == false {}
use x directly:
if x {} if !y {}
https://rust-lang.github.io/rust-clippy/master/index.html#/bool_comparison
Hey @0xLucqs, may I give this one a try ? 🚀
Hey @lauchaves! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
What it does
Checks for expressions of the form x == true, x != true and order comparisons such as x < true (or vice versa) and suggest using the variable directly.
Why is this bad?
Unnecessary code.
Example
use x directly:
https://rust-lang.github.io/rust-clippy/master/index.html#/bool_comparison