@@ -18,131 +18,119 @@ error: iterating on a map's values
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
- error: iterating on a map's values
22
- --> $DIR/iter_kv_map.rs:18:13
23
- |
24
- LL | let _ = map.iter().map(|(_, val)| {val}).collect::<Vec<_>>();
25
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|val| {val})`
26
-
27
21
error: iterating on a map's keys
28
- --> $DIR/iter_kv_map.rs:20 :13
22
+ --> $DIR/iter_kv_map.rs:19 :13
29
23
|
30
24
LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
31
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
32
26
33
27
error: iterating on a map's keys
34
- --> $DIR/iter_kv_map.rs:21 :13
28
+ --> $DIR/iter_kv_map.rs:20 :13
35
29
|
36
30
LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
37
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
38
32
39
33
error: iterating on a map's values
40
- --> $DIR/iter_kv_map.rs:23 :13
34
+ --> $DIR/iter_kv_map.rs:22 :13
41
35
|
42
36
LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
43
37
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
44
38
45
39
error: iterating on a map's values
46
- --> $DIR/iter_kv_map.rs:24 :13
40
+ --> $DIR/iter_kv_map.rs:23 :13
47
41
|
48
42
LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
49
43
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
50
44
51
45
error: iterating on a map's values
52
- --> $DIR/iter_kv_map.rs:26 :13
46
+ --> $DIR/iter_kv_map.rs:25 :13
53
47
|
54
48
LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
55
49
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
56
50
57
51
error: iterating on a map's keys
58
- --> $DIR/iter_kv_map.rs:27 :13
52
+ --> $DIR/iter_kv_map.rs:26 :13
59
53
|
60
54
LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
61
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
62
56
63
57
error: iterating on a map's keys
64
- --> $DIR/iter_kv_map.rs:37 :13
58
+ --> $DIR/iter_kv_map.rs:36 :13
65
59
|
66
60
LL | let _ = map.iter().map(|(key, _value)| key * 9).count();
67
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
68
62
69
63
error: iterating on a map's values
70
- --> $DIR/iter_kv_map.rs:38 :13
64
+ --> $DIR/iter_kv_map.rs:37 :13
71
65
|
72
66
LL | let _ = map.iter().map(|(_key, value)| value * 17).count();
73
67
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
74
68
75
69
error: iterating on a map's keys
76
- --> $DIR/iter_kv_map.rs:42 :13
70
+ --> $DIR/iter_kv_map.rs:41 :13
77
71
|
78
72
LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
79
73
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
80
74
81
75
error: iterating on a map's values
82
- --> $DIR/iter_kv_map.rs:43 :13
76
+ --> $DIR/iter_kv_map.rs:42 :13
83
77
|
84
78
LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
85
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
86
80
87
81
error: iterating on a map's values
88
- --> $DIR/iter_kv_map.rs:44 :13
82
+ --> $DIR/iter_kv_map.rs:43 :13
89
83
|
90
84
LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
91
85
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
92
86
93
- error: iterating on a map's values
94
- --> $DIR/iter_kv_map.rs:45:13
95
- |
96
- LL | let _ = map.iter().map(|(_, val)| {val}).collect::<Vec<_>>();
97
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|val| {val})`
98
-
99
87
error: iterating on a map's keys
100
- --> $DIR/iter_kv_map.rs:47 :13
88
+ --> $DIR/iter_kv_map.rs:45 :13
101
89
|
102
90
LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
103
91
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
104
92
105
93
error: iterating on a map's keys
106
- --> $DIR/iter_kv_map.rs:48 :13
94
+ --> $DIR/iter_kv_map.rs:46 :13
107
95
|
108
96
LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
109
97
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
110
98
111
99
error: iterating on a map's values
112
- --> $DIR/iter_kv_map.rs:50 :13
100
+ --> $DIR/iter_kv_map.rs:48 :13
113
101
|
114
102
LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
115
103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
116
104
117
105
error: iterating on a map's values
118
- --> $DIR/iter_kv_map.rs:51 :13
106
+ --> $DIR/iter_kv_map.rs:49 :13
119
107
|
120
108
LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
121
109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
122
110
123
111
error: iterating on a map's values
124
- --> $DIR/iter_kv_map.rs:53 :13
112
+ --> $DIR/iter_kv_map.rs:51 :13
125
113
|
126
114
LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
127
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
128
116
129
117
error: iterating on a map's keys
130
- --> $DIR/iter_kv_map.rs:54 :13
118
+ --> $DIR/iter_kv_map.rs:52 :13
131
119
|
132
120
LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
133
121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
134
122
135
123
error: iterating on a map's keys
136
- --> $DIR/iter_kv_map.rs:64 :13
124
+ --> $DIR/iter_kv_map.rs:62 :13
137
125
|
138
126
LL | let _ = map.iter().map(|(key, _value)| key * 9).count();
139
127
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
140
128
141
129
error: iterating on a map's values
142
- --> $DIR/iter_kv_map.rs:65 :13
130
+ --> $DIR/iter_kv_map.rs:63 :13
143
131
|
144
132
LL | let _ = map.iter().map(|(_key, value)| value * 17).count();
145
133
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
146
134
147
- error: aborting due to 24 previous errors
135
+ error: aborting due to 22 previous errors
148
136
0 commit comments