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

error: unnecessary use of `get("a").is_none()`
  --> tests/ui/unnecessary_get_then_check.rs:9:15
   |
LL |     let _ = s.get("a").is_none();
   |             --^^^^^^^^^^^^^^^^^^
   |             |
   |             help: replace it with: `!s.contains("a")`

error: unnecessary use of `get("a").is_some()`
  --> tests/ui/unnecessary_get_then_check.rs:13:15
   |
LL |     let _ = s.get("a").is_some();
   |               ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("a")`

error: unnecessary use of `get("a").is_none()`
  --> tests/ui/unnecessary_get_then_check.rs:15:15
   |
LL |     let _ = s.get("a").is_none();
   |             --^^^^^^^^^^^^^^^^^^
   |             |
   |             help: replace it with: `!s.contains_key("a")`

error: unnecessary use of `get("a").is_some()`
  --> tests/ui/unnecessary_get_then_check.rs:19:15
   |
LL |     let _ = s.get("a").is_some();
   |               ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains("a")`

error: unnecessary use of `get("a").is_none()`
  --> tests/ui/unnecessary_get_then_check.rs:21:15
   |
LL |     let _ = s.get("a").is_none();
   |             --^^^^^^^^^^^^^^^^^^
   |             |
   |             help: replace it with: `!s.contains("a")`

error: unnecessary use of `get("a").is_some()`
  --> tests/ui/unnecessary_get_then_check.rs:25:15
   |
LL |     let _ = s.get("a").is_some();
   |               ^^^^^^^^^^^^^^^^^^ help: replace it with: `contains_key("a")`

error: unnecessary use of `get("a").is_none()`
  --> tests/ui/unnecessary_get_then_check.rs:27:15
   |
LL |     let _ = s.get("a").is_none();
   |             --^^^^^^^^^^^^^^^^^^
   |             |
   |             help: replace it with: `!s.contains_key("a")`

error: unnecessary use of `get::<str>("a").is_some()`
  --> tests/ui/unnecessary_get_then_check.rs:32:15
   |
LL |     let _ = s.get::<str>("a").is_some();
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains::<str>("a")`

error: unnecessary use of `get::<str>("a").is_none()`
  --> tests/ui/unnecessary_get_then_check.rs:34:15
   |
LL |     let _ = s.get::<str>("a").is_none();
   |             --^^^^^^^^^^^^^^^^^^^^^^^^^
   |             |
   |             help: replace it with: `!s.contains::<str>("a")`

error: aborting due to 10 previous errors