rust-clippy/tests/ui/double_comparison.fixed

32 lines
459 B
Rust
Raw Normal View History

//@run-rustfix
2023-06-10 11:43:30 +00:00
#![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
}
}