@@ -8,31 +8,31 @@ LL | true.then_some("a").unwrap_or("b");
88 = help: to override `-D warnings` add `#[allow(clippy::obfuscated_if_else)]`
99
1010error: this method chain can be written more clearly with `if .. else ..`
11- --> tests/ui/obfuscated_if_else.rs:6 :5
11+ --> tests/ui/obfuscated_if_else.rs:7 :5
1212 |
1313LL | true.then(|| "a").unwrap_or("b");
1414 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { "a" } else { "b" }`
1515
1616error: this method chain can be written more clearly with `if .. else ..`
17- --> tests/ui/obfuscated_if_else.rs:9 :5
17+ --> tests/ui/obfuscated_if_else.rs:11 :5
1818 |
1919LL | (a == 1).then_some("a").unwrap_or("b");
2020 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if a == 1 { "a" } else { "b" }`
2121
2222error: this method chain can be written more clearly with `if .. else ..`
23- --> tests/ui/obfuscated_if_else.rs:10 :5
23+ --> tests/ui/obfuscated_if_else.rs:13 :5
2424 |
2525LL | (a == 1).then(|| "a").unwrap_or("b");
2626 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if a == 1 { "a" } else { "b" }`
2727
2828error: this method chain can be written more clearly with `if .. else ..`
29- --> tests/ui/obfuscated_if_else.rs:16 :5
29+ --> tests/ui/obfuscated_if_else.rs:20 :5
3030 |
3131LL | true.then_some(a += 1).unwrap_or(());
3232 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { a += 1 } else { () }`
3333
3434error: this method chain can be written more clearly with `if .. else ..`
35- --> tests/ui/obfuscated_if_else.rs:17 :5
35+ --> tests/ui/obfuscated_if_else.rs:22 :5
3636 |
3737LL | true.then_some(()).unwrap_or(a += 2);
3838 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if true { () } else { a += 2 }`
0 commit comments