2022-08-29 13:39:25 -05:00
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:14:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::iter-kv-map` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:15:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:16:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:18:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:19:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:21:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:22:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:24:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:25:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:35:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(key, _value)| key * 9).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:36:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(_key, value)| value * 17).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
2023-01-04 15:32:34 -06:00
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:39:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2023-01-04 15:32:34 -06:00
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, ref val)| ref_acceptor(val)).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|ref val| ref_acceptor(val))`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:42:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
|
|
|
LL | let _ = map
|
|
|
|
| _____________^
|
|
|
|
LL | | .clone()
|
|
|
|
LL | | .into_iter()
|
|
|
|
LL | | .map(|(_, mut val)| {
|
|
|
|
LL | | val += 2;
|
|
|
|
LL | | val
|
|
|
|
LL | | })
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL ~ let _ = map
|
|
|
|
LL + .clone().into_values().map(|mut val| {
|
|
|
|
LL + val += 2;
|
|
|
|
LL + val
|
|
|
|
LL + })
|
|
|
|
|
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:52:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, mut val)| val).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:56:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
2022-08-29 13:39:25 -05:00
|
|
|
LL | let _ = map.iter().map(|(key, _)| key).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:57:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.iter().map(|(_, value)| value).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values()`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:58:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.iter().map(|(_, v)| v + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|v| v + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:60:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(key, _)| key).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys()`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:61:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(key, _)| key + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_keys().map(|key| key + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:63:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, val)| val).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:64:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, val)| val + 2).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|val| val + 2)`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:66:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().iter().map(|(_, val)| val).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().values()`
|
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:67:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(key, _)| key).filter(|x| *x % 2 == 0).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys()`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
error: iterating on a map's keys
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:77:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(key, _value)| key * 9).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.keys().map(|key| key * 9)`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:78:13
|
2022-08-29 13:39:25 -05:00
|
|
|
|
|
2022-09-14 23:16:01 -05:00
|
|
|
LL | let _ = map.iter().map(|(_key, value)| value * 17).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.values().map(|value| value * 17)`
|
2022-08-29 13:39:25 -05:00
|
|
|
|
2023-01-04 15:32:34 -06:00
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:81:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, ref val)| ref_acceptor(val)).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values().map(|ref val| ref_acceptor(val))`
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:84:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
|
|
|
LL | let _ = map
|
|
|
|
| _____________^
|
|
|
|
LL | | .clone()
|
|
|
|
LL | | .into_iter()
|
|
|
|
LL | | .map(|(_, mut val)| {
|
|
|
|
LL | | val += 2;
|
|
|
|
LL | | val
|
|
|
|
LL | | })
|
|
|
|
| |__________^
|
|
|
|
|
|
|
|
|
help: try
|
|
|
|
|
|
|
|
|
LL ~ let _ = map
|
|
|
|
LL + .clone().into_values().map(|mut val| {
|
|
|
|
LL + val += 2;
|
|
|
|
LL + val
|
|
|
|
LL + })
|
|
|
|
|
|
|
|
|
|
|
|
|
error: iterating on a map's values
|
2023-07-27 06:40:22 -05:00
|
|
|
--> $DIR/iter_kv_map.rs:94:13
|
2023-01-04 15:32:34 -06:00
|
|
|
|
|
|
|
|
LL | let _ = map.clone().into_iter().map(|(_, mut val)| val).count();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `map.clone().into_values()`
|
|
|
|
|
|
|
|
error: aborting due to 28 previous errors
|
2022-08-29 13:39:25 -05:00
|
|
|
|