2022-07-28 17:08:22 +00:00
|
|
|
error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/obfuscated_if_else.rs:4:5
|
2022-07-28 17:08:22 +00: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 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::obfuscated_if_else)]`
|
2022-07-28 17:08:22 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|