rust-clippy/tests/ui/double_comparison.fixed
2023-06-10 06:51:03 -05:00

31 lines
459 B
Rust

//@run-rustfix
#![allow(clippy::needless_if)]
fn main() {
let x = 1;
let y = 2;
if x <= y {
// do something
}
if x <= y {
// do something
}
if x >= y {
// do something
}
if x >= y {
// do something
}
if x != y {
// do something
}
if x != y {
// do something
}
if x == y {
// do something
}
if x == y {
// do something
}
}