mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
30 lines
444 B
Rust
30 lines
444 B
Rust
#![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
|
|
}
|
|
}
|