rust-clippy/tests/run-pass/if_same_then_else.rs

14 lines
215 B
Rust
Raw Normal View History

2018-07-30 09:33:44 +00:00
#![deny(clippy::if_same_then_else)]
fn main() {}
pub fn foo(a: i32, b: i32) -> Option<&'static str> {
if a == b {
None
} else if a > b {
Some("a pfeil b")
} else {
None
}
}