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