|
1 | 1 | error: iterating on a map's keys |
2 | | - --> $DIR/iter_kv_map.rs:15:13 |
| 2 | + --> $DIR/iter_kv_map.rs:16:13 |
3 | 3 | | |
4 | 4 | LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>(); |
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()` |
6 | 6 | | |
7 | 7 | = note: `-D clippy::iter-kv-map` implied by `-D warnings` |
8 | 8 |
|
9 | 9 | error: iterating on a map's values |
10 | | - --> $DIR/iter_kv_map.rs:16:13 |
| 10 | + --> $DIR/iter_kv_map.rs:17:13 |
11 | 11 | | |
12 | 12 | LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>(); |
13 | 13 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()` |
14 | 14 |
|
15 | 15 | error: iterating on a map's values |
16 | | - --> $DIR/iter_kv_map.rs:17:13 |
| 16 | + --> $DIR/iter_kv_map.rs:18:13 |
17 | 17 | | |
18 | 18 | LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>(); |
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)` |
20 | 20 |
|
21 | 21 | error: iterating on a map's keys |
22 | | - --> $DIR/iter_kv_map.rs:19:13 |
| 22 | + --> $DIR/iter_kv_map.rs:20:13 |
23 | 23 | | |
24 | 24 | LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>(); |
25 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()` |
26 | 26 |
|
27 | 27 | error: iterating on a map's keys |
28 | | - --> $DIR/iter_kv_map.rs:20:13 |
| 28 | + --> $DIR/iter_kv_map.rs:21:13 |
29 | 29 | | |
30 | 30 | LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>(); |
31 | 31 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)` |
32 | 32 |
|
33 | 33 | error: iterating on a map's values |
34 | | - --> $DIR/iter_kv_map.rs:22:13 |
| 34 | + --> $DIR/iter_kv_map.rs:23:13 |
35 | 35 | | |
36 | 36 | LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>(); |
37 | 37 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()` |
38 | 38 |
|
39 | 39 | error: iterating on a map's values |
40 | | - --> $DIR/iter_kv_map.rs:23:13 |
| 40 | + --> $DIR/iter_kv_map.rs:24:13 |
41 | 41 | | |
42 | 42 | LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>(); |
43 | 43 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)` |
44 | 44 |
|
45 | 45 | error: iterating on a map's values |
46 | | - --> $DIR/iter_kv_map.rs:25:13 |
| 46 | + --> $DIR/iter_kv_map.rs:26:13 |
47 | 47 | | |
48 | 48 | LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>(); |
49 | 49 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()` |
50 | 50 |
|
51 | 51 | error: iterating on a map's keys |
52 | | - --> $DIR/iter_kv_map.rs:26:13 |
| 52 | + --> $DIR/iter_kv_map.rs:27:13 |
53 | 53 | | |
54 | 54 | LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count(); |
55 | 55 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()` |
56 | 56 |
|
57 | 57 | error: iterating on a map's keys |
58 | | - --> $DIR/iter_kv_map.rs:36:13 |
| 58 | + --> $DIR/iter_kv_map.rs:37:13 |
59 | 59 | | |
60 | 60 | LL | let _ = map.iter().map(|(key, _value)| key * 9).count(); |
61 | 61 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)` |
62 | 62 |
|
63 | 63 | error: iterating on a map's values |
64 | | - --> $DIR/iter_kv_map.rs:37:13 |
| 64 | + --> $DIR/iter_kv_map.rs:38:13 |
65 | 65 | | |
66 | 66 | LL | let _ = map.iter().map(|(_key, value)| value * 17).count(); |
67 | 67 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)` |
68 | 68 |
|
69 | | -error: iterating on a map's keys |
| 69 | +error: iterating on a map's values |
70 | 70 | --> $DIR/iter_kv_map.rs:41:13 |
71 | 71 | | |
| 72 | +LL | let _ = map.clone().into_iter().map(|(_, ref val)| ref_acceptor(val)).count(); |
| 73 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|ref val| ref_acceptor(val))` |
| 74 | + |
| 75 | +error: iterating on a map's values |
| 76 | + --> $DIR/iter_kv_map.rs:44:13 |
| 77 | + | |
| 78 | +LL | let _ = map |
| 79 | + | _____________^ |
| 80 | +LL | | .clone() |
| 81 | +LL | | .into_iter() |
| 82 | +LL | | .map(|(_, mut val)| { |
| 83 | +LL | | val += 2; |
| 84 | +LL | | val |
| 85 | +LL | | }) |
| 86 | + | |__________^ |
| 87 | + | |
| 88 | +help: try |
| 89 | + | |
| 90 | +LL ~ let _ = map |
| 91 | +LL + .clone().into_values().map(|mut val| { |
| 92 | +LL + val += 2; |
| 93 | +LL + val |
| 94 | +LL + }) |
| 95 | + | |
| 96 | + |
| 97 | +error: iterating on a map's values |
| 98 | + --> $DIR/iter_kv_map.rs:54:13 |
| 99 | + | |
| 100 | +LL | let _ = map.clone().into_iter().map(|(_, mut val)| val).count(); |
| 101 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()` |
| 102 | + |
| 103 | +error: iterating on a map's keys |
| 104 | + --> $DIR/iter_kv_map.rs:58:13 |
| 105 | + | |
72 | 106 | LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>(); |
73 | 107 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()` |
74 | 108 |
|
75 | 109 | error: iterating on a map's values |
76 | | - --> $DIR/iter_kv_map.rs:42:13 |
| 110 | + --> $DIR/iter_kv_map.rs:59:13 |
77 | 111 | | |
78 | 112 | LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>(); |
79 | 113 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()` |
80 | 114 |
|
81 | 115 | error: iterating on a map's values |
82 | | - --> $DIR/iter_kv_map.rs:43:13 |
| 116 | + --> $DIR/iter_kv_map.rs:60:13 |
83 | 117 | | |
84 | 118 | LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>(); |
85 | 119 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)` |
86 | 120 |
|
87 | 121 | error: iterating on a map's keys |
88 | | - --> $DIR/iter_kv_map.rs:45:13 |
| 122 | + --> $DIR/iter_kv_map.rs:62:13 |
89 | 123 | | |
90 | 124 | LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>(); |
91 | 125 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()` |
92 | 126 |
|
93 | 127 | error: iterating on a map's keys |
94 | | - --> $DIR/iter_kv_map.rs:46:13 |
| 128 | + --> $DIR/iter_kv_map.rs:63:13 |
95 | 129 | | |
96 | 130 | LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>(); |
97 | 131 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)` |
98 | 132 |
|
99 | 133 | error: iterating on a map's values |
100 | | - --> $DIR/iter_kv_map.rs:48:13 |
| 134 | + --> $DIR/iter_kv_map.rs:65:13 |
101 | 135 | | |
102 | 136 | LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>(); |
103 | 137 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()` |
104 | 138 |
|
105 | 139 | error: iterating on a map's values |
106 | | - --> $DIR/iter_kv_map.rs:49:13 |
| 140 | + --> $DIR/iter_kv_map.rs:66:13 |
107 | 141 | | |
108 | 142 | LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>(); |
109 | 143 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)` |
110 | 144 |
|
111 | 145 | error: iterating on a map's values |
112 | | - --> $DIR/iter_kv_map.rs:51:13 |
| 146 | + --> $DIR/iter_kv_map.rs:68:13 |
113 | 147 | | |
114 | 148 | LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>(); |
115 | 149 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()` |
116 | 150 |
|
117 | 151 | error: iterating on a map's keys |
118 | | - --> $DIR/iter_kv_map.rs:52:13 |
| 152 | + --> $DIR/iter_kv_map.rs:69:13 |
119 | 153 | | |
120 | 154 | LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count(); |
121 | 155 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()` |
122 | 156 |
|
123 | 157 | error: iterating on a map's keys |
124 | | - --> $DIR/iter_kv_map.rs:62:13 |
| 158 | + --> $DIR/iter_kv_map.rs:79:13 |
125 | 159 | | |
126 | 160 | LL | let _ = map.iter().map(|(key, _value)| key * 9).count(); |
127 | 161 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)` |
128 | 162 |
|
129 | 163 | error: iterating on a map's values |
130 | | - --> $DIR/iter_kv_map.rs:63:13 |
| 164 | + --> $DIR/iter_kv_map.rs:80:13 |
131 | 165 | | |
132 | 166 | LL | let _ = map.iter().map(|(_key, value)| value * 17).count(); |
133 | 167 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)` |
134 | 168 |
|
135 | | -error: aborting due to 22 previous errors |
| 169 | +error: iterating on a map's values |
| 170 | + --> $DIR/iter_kv_map.rs:83:13 |
| 171 | + | |
| 172 | +LL | let _ = map.clone().into_iter().map(|(_, ref val)| ref_acceptor(val)).count(); |
| 173 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|ref val| ref_acceptor(val))` |
| 174 | + |
| 175 | +error: iterating on a map's values |
| 176 | + --> $DIR/iter_kv_map.rs:86:13 |
| 177 | + | |
| 178 | +LL | let _ = map |
| 179 | + | _____________^ |
| 180 | +LL | | .clone() |
| 181 | +LL | | .into_iter() |
| 182 | +LL | | .map(|(_, mut val)| { |
| 183 | +LL | | val += 2; |
| 184 | +LL | | val |
| 185 | +LL | | }) |
| 186 | + | |__________^ |
| 187 | + | |
| 188 | +help: try |
| 189 | + | |
| 190 | +LL ~ let _ = map |
| 191 | +LL + .clone().into_values().map(|mut val| { |
| 192 | +LL + val += 2; |
| 193 | +LL + val |
| 194 | +LL + }) |
| 195 | + | |
| 196 | + |
| 197 | +error: iterating on a map's values |
| 198 | + --> $DIR/iter_kv_map.rs:96:13 |
| 199 | + | |
| 200 | +LL | let _ = map.clone().into_iter().map(|(_, mut val)| val).count(); |
| 201 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()` |
| 202 | + |
| 203 | +error: aborting due to 28 previous errors |
136 | 204 |
|
0 commit comments