mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
31 lines
459 B
Rust
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
|
|
}
|
|
}
|