2023-06-10 06:43:30 -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
|
|
|
|
}
|
|
|
|
}
|