mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 08:30:45 +00:00
15 lines
240 B
Rust
15 lines
240 B
Rust
#![feature(tool_lints)]
|
|
|
|
#![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
|
|
}
|
|
}
|