1 error: iterating on a map's keys
2 --> $DIR/iter_kv_map.rs:14:13
4 LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
7 = note: `-D clippy::iter-kv-map` implied by `-D warnings`
9 error: iterating on a map's values
10 --> $DIR/iter_kv_map.rs:15:13
12 LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
15 error: iterating on a map's values
16 --> $DIR/iter_kv_map.rs:16:13
18 LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
21 error: iterating on a map's values
22 --> $DIR/iter_kv_map.rs:17:13
24 LL | let _ = map.iter().map(|(_, val)| {val}).collect::<Vec<_>>();
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|val| {val})`
27 error: iterating on a map's keys
28 --> $DIR/iter_kv_map.rs:19:13
30 LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
33 error: iterating on a map's keys
34 --> $DIR/iter_kv_map.rs:20:13
36 LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
39 error: iterating on a map's values
40 --> $DIR/iter_kv_map.rs:22:13
42 LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
45 error: iterating on a map's values
46 --> $DIR/iter_kv_map.rs:23:13
48 LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
51 error: iterating on a map's values
52 --> $DIR/iter_kv_map.rs:25:13
54 LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
57 error: iterating on a map's keys
58 --> $DIR/iter_kv_map.rs:26:5
60 LL | map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
63 error: iterating on a map's keys
64 --> $DIR/iter_kv_map.rs:36:5
66 LL | map.iter().map(|(key, _value)| key * 9).count();
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
69 error: iterating on a map's values
70 --> $DIR/iter_kv_map.rs:37:5
72 LL | map.iter().map(|(_key, value)| value * 17).count();
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
75 error: iterating on a map's keys
76 --> $DIR/iter_kv_map.rs:41:13
78 LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
81 error: iterating on a map's values
82 --> $DIR/iter_kv_map.rs:42:13
84 LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
87 error: iterating on a map's values
88 --> $DIR/iter_kv_map.rs:43:13
90 LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
93 error: iterating on a map's values
94 --> $DIR/iter_kv_map.rs:44:13
96 LL | let _ = map.iter().map(|(_, val)| {val}).collect::<Vec<_>>();
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|val| {val})`
99 error: iterating on a map's keys
100 --> $DIR/iter_kv_map.rs:46:13
102 LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
105 error: iterating on a map's keys
106 --> $DIR/iter_kv_map.rs:47:13
108 LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
111 error: iterating on a map's values
112 --> $DIR/iter_kv_map.rs:49:13
114 LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
117 error: iterating on a map's values
118 --> $DIR/iter_kv_map.rs:50:13
120 LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
123 error: iterating on a map's values
124 --> $DIR/iter_kv_map.rs:52:13
126 LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
129 error: iterating on a map's keys
130 --> $DIR/iter_kv_map.rs:53:5
132 LL | map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
135 error: iterating on a map's keys
136 --> $DIR/iter_kv_map.rs:63:5
138 LL | map.iter().map(|(key, _value)| key * 9).count();
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
141 error: iterating on a map's values
142 --> $DIR/iter_kv_map.rs:64:5
144 LL | map.iter().map(|(_key, value)| value * 17).count();
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
147 error: aborting due to 24 previous errors