@@ -49,73 +49,73 @@ LL | map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
49
49
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
50
50
51
51
error: you seem to want to iterate on a map's keys
52
- --> $DIR/iter_kv_map.rs:29 :5
52
+ --> $DIR/iter_kv_map.rs:32 :5
53
53
|
54
54
LL | map.iter().map(|(key, _value)| key * 9).count();
55
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.keys().map(|key| key * 9)`
56
56
57
57
error: you seem to want to iterate on a map's values
58
- --> $DIR/iter_kv_map.rs:30 :5
58
+ --> $DIR/iter_kv_map.rs:33 :5
59
59
|
60
60
LL | map.iter().map(|(_key, value)| value * 17).count();
61
61
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.values().map(|value| value * 17)`
62
62
63
63
error: iterating on a map's keys
64
- --> $DIR/iter_kv_map.rs:34 :13
64
+ --> $DIR/iter_kv_map.rs:37 :13
65
65
|
66
66
LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
67
67
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
68
68
69
69
error: iterating on a map's values
70
- --> $DIR/iter_kv_map.rs:35 :13
70
+ --> $DIR/iter_kv_map.rs:38 :13
71
71
|
72
72
LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
73
73
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
74
74
75
75
error: you seem to want to iterate on a map's values
76
- --> $DIR/iter_kv_map.rs:36 :13
76
+ --> $DIR/iter_kv_map.rs:39 :13
77
77
|
78
78
LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.values().map(|v| v + 2)`
80
80
81
81
error: iterating on a map's keys
82
- --> $DIR/iter_kv_map.rs:38 :13
82
+ --> $DIR/iter_kv_map.rs:41 :13
83
83
|
84
84
LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
85
85
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
86
86
87
87
error: you seem to want to iterate on a map's keys
88
- --> $DIR/iter_kv_map.rs:39 :13
88
+ --> $DIR/iter_kv_map.rs:42 :13
89
89
|
90
90
LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
91
91
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.clone().into_keys().map(|key| key + 2)`
92
92
93
93
error: iterating on a map's values
94
- --> $DIR/iter_kv_map.rs:41 :13
94
+ --> $DIR/iter_kv_map.rs:44 :13
95
95
|
96
96
LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
97
97
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
98
98
99
99
error: you seem to want to iterate on a map's values
100
- --> $DIR/iter_kv_map.rs:42 :13
100
+ --> $DIR/iter_kv_map.rs:45 :13
101
101
|
102
102
LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
103
103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.clone().into_values().map(|val| val + 2)`
104
104
105
105
error: iterating on a map's keys
106
- --> $DIR/iter_kv_map.rs:45 :5
106
+ --> $DIR/iter_kv_map.rs:48 :5
107
107
|
108
108
LL | map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
109
109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
110
110
111
111
error: you seem to want to iterate on a map's keys
112
- --> $DIR/iter_kv_map.rs:51 :5
112
+ --> $DIR/iter_kv_map.rs:54 :5
113
113
|
114
114
LL | map.iter().map(|(key, _value)| key * 9).count();
115
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.keys().map(|key| key * 9)`
116
116
117
117
error: you seem to want to iterate on a map's values
118
- --> $DIR/iter_kv_map.rs:52 :5
118
+ --> $DIR/iter_kv_map.rs:55 :5
119
119
|
120
120
LL | map.iter().map(|(_key, value)| value * 17).count();
121
121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the corresponding method: `map.values().map(|value| value * 17)`
0 commit comments