mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 18:28:40 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
30 lines
500 B
Rust
30 lines
500 B
Rust
// run-rustfix
|
|
|
|
fn main() {
|
|
let x = 1;
|
|
let y = 2;
|
|
if x == y || x < y {
|
|
// do something
|
|
}
|
|
if x < y || x == y {
|
|
// do something
|
|
}
|
|
if x == y || x > y {
|
|
// do something
|
|
}
|
|
if x > y || x == y {
|
|
// do something
|
|
}
|
|
if x < y || x > y {
|
|
// do something
|
|
}
|
|
if x > y || x < y {
|
|
// do something
|
|
}
|
|
if x <= y && x >= y {
|
|
// do something
|
|
}
|
|
if x >= y && x <= y {
|
|
// do something
|
|
}
|
|
}
|