2022-07-28 12:08:22 -05:00
|
|
|
error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/obfuscated_if_else.rs:4:5
|
2022-07-28 12:08:22 -05:00
|
|
|
|
|
|
|
|
LL | true.then_some("a").unwrap_or("b");
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { "a" } else { "b" }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::obfuscated-if-else` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::obfuscated_if_else)]`
|
2022-07-28 12:08:22 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|