|
| 1 | +error: unnecessary use of `get("a").is_some()` |
| 2 | + --> tests/ui/unnecessary_get_then_check.rs:7:15 |
| 3 | + | |
| 4 | +LL | let _ = s.get("a").is_some(); |
| 5 | + | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains("a")` |
| 6 | + | |
| 7 | + = note: `-D clippy::unnecessary-get-then-check` implied by `-D warnings` |
| 8 | + = help: to override `-D warnings` add `#[allow(clippy::unnecessary_get_then_check)]` |
| 9 | + |
| 10 | +error: unnecessary use of `get("a").is_none()` |
| 11 | + --> tests/ui/unnecessary_get_then_check.rs:8:15 |
| 12 | + | |
| 13 | +LL | let _ = s.get("a").is_none(); |
| 14 | + | --^^^^^^^^^^^^^^^^^^ |
| 15 | + | | |
| 16 | + | help: replace it with: `!s.contains("a")` |
| 17 | + |
| 18 | +error: unnecessary use of `get("a").is_some()` |
| 19 | + --> tests/ui/unnecessary_get_then_check.rs:11:15 |
| 20 | + | |
| 21 | +LL | let _ = s.get("a").is_some(); |
| 22 | + | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("a")` |
| 23 | + |
| 24 | +error: unnecessary use of `get("a").is_none()` |
| 25 | + --> tests/ui/unnecessary_get_then_check.rs:12:15 |
| 26 | + | |
| 27 | +LL | let _ = s.get("a").is_none(); |
| 28 | + | --^^^^^^^^^^^^^^^^^^ |
| 29 | + | | |
| 30 | + | help: replace it with: `!s.contains_key("a")` |
| 31 | + |
| 32 | +error: unnecessary use of `get("a").is_some()` |
| 33 | + --> tests/ui/unnecessary_get_then_check.rs:15:15 |
| 34 | + | |
| 35 | +LL | let _ = s.get("a").is_some(); |
| 36 | + | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains("a")` |
| 37 | + |
| 38 | +error: unnecessary use of `get("a").is_none()` |
| 39 | + --> tests/ui/unnecessary_get_then_check.rs:16:15 |
| 40 | + | |
| 41 | +LL | let _ = s.get("a").is_none(); |
| 42 | + | --^^^^^^^^^^^^^^^^^^ |
| 43 | + | | |
| 44 | + | help: replace it with: `!s.contains("a")` |
| 45 | + |
| 46 | +error: unnecessary use of `get("a").is_some()` |
| 47 | + --> tests/ui/unnecessary_get_then_check.rs:19:15 |
| 48 | + | |
| 49 | +LL | let _ = s.get("a").is_some(); |
| 50 | + | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("a")` |
| 51 | + |
| 52 | +error: unnecessary use of `get("a").is_none()` |
| 53 | + --> tests/ui/unnecessary_get_then_check.rs:20:15 |
| 54 | + | |
| 55 | +LL | let _ = s.get("a").is_none(); |
| 56 | + | --^^^^^^^^^^^^^^^^^^ |
| 57 | + | | |
| 58 | + | help: replace it with: `!s.contains_key("a")` |
| 59 | + |
| 60 | +error: unnecessary use of `get::<str>("a").is_some()` |
| 61 | + --> tests/ui/unnecessary_get_then_check.rs:24:15 |
| 62 | + | |
| 63 | +LL | let _ = s.get::<str>("a").is_some(); |
| 64 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains::<str>("a")` |
| 65 | + |
| 66 | +error: unnecessary use of `get::<str>("a").is_none()` |
| 67 | + --> tests/ui/unnecessary_get_then_check.rs:25:15 |
| 68 | + | |
| 69 | +LL | let _ = s.get::<str>("a").is_none(); |
| 70 | + | --^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 71 | + | | |
| 72 | + | help: replace it with: `!s.contains::<str>("a")` |
| 73 | + |
| 74 | +error: aborting due to 10 previous errors |
| 75 | + |
0 commit comments