rust-clippy/tests/ui/obfuscated_if_else.rs
Ariel Uy 9ff7c91100 Add new lint obfuscated_if_else
New lint suggests using `if .. else ..` instead of
`.then_some(..).unwrap_or(..)`.
2022-07-17 18:44:49 -07:00

7 lines
108 B
Rust

// run-rustfix
#![warn(clippy::obfuscated_if_else)]
fn main() {
true.then_some("a").unwrap_or("b");
}