2022-07-28 12:08:22 -05:00
|
|
|
error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/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
|
|
|
|
2023-11-21 11:08:42 -06:00
|
|
|
error: aborting due to 1 previous error
|
2022-07-28 12:08:22 -05:00
|
|
|
|