]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/obfuscated_if_else.stderr
Merge commit '3c7e7dbc1583a0b06df5bd7623dd354a4debd23d' into clippyup
[rust.git] / src / tools / clippy / tests / ui / obfuscated_if_else.stderr
1 error: use of `.then_some(..).unwrap_or(..)` can be written more clearly with `if .. else ..`
2   --> $DIR/obfuscated_if_else.rs:6:5
3    |
4 LL |     true.then_some("a").unwrap_or("b");
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { "a" } else { "b" }`
6    |
7    = note: `-D clippy::obfuscated-if-else` implied by `-D warnings`
8
9 error: aborting due to previous error
10