2023-04-23 06:03:09 -05:00
|
|
|
//@run-rustfix
|
2023-07-02 07:35:19 -05:00
|
|
|
#![allow(clippy::needless_if)]
|
2019-01-04 04:22:38 -06:00
|
|
|
|
2018-01-29 19:35:35 -06:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|