2023-07-02 14:35:19 +02:00
|
|
|
#![allow(clippy::needless_if)]
|
2019-01-04 11:22:38 +01:00
|
|
|
|
2018-01-30 10:35:35 +09: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
|
|
|
|
}
|
|
|
|
}
|