mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 07:04:18 +00:00
28 lines
484 B
Rust
28 lines
484 B
Rust
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
|
|
}
|
|
}
|