2020-07-14 07:59:59 -05:00
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:7:47
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(not_identity).map(|x| return x).collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::map-identity` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::map_identity)]`
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:8:57
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
|
|
|
|
| ^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:8:29
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Vec<_> = x.iter().map(std::convert::identity).map(|y| y).collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:9:32
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Option<u8> = Some(3).map(|x| x);
|
|
|
|
| ^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:10:36
|
2020-07-14 07:59:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Result<i8, f32> = Ok(-3).map(|x| {
|
|
|
|
| ____________________________________^
|
|
|
|
LL | | return x;
|
|
|
|
LL | | });
|
|
|
|
| |______^ help: remove the call to `map`
|
|
|
|
|
2022-04-07 12:39:59 -05:00
|
|
|
error: unnecessary map of the identity function
|
2023-08-24 14:32:12 -05:00
|
|
|
--> $DIR/map_identity.rs:20:36
|
2022-04-07 12:39:59 -05:00
|
|
|
|
|
|
|
|
LL | let _: Result<u32, u32> = Ok(1).map_err(|a| a);
|
|
|
|
| ^^^^^^^^^^^^^^^ help: remove the call to `map_err`
|
|
|
|
|
2023-06-13 08:21:14 -05:00
|
|
|
error: unnecessary map of the identity function
|
2023-11-11 06:48:26 -06:00
|
|
|
--> $DIR/map_identity.rs:30:22
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
2023-11-11 06:48:26 -06:00
|
|
|
LL | let _ = x.clone().map(|(x, y)| (x, y));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-11-11 06:48:26 -06:00
|
|
|
--> $DIR/map_identity.rs:31:22
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
2023-11-11 06:48:26 -06:00
|
|
|
LL | let _ = x.clone().map(|(x, y)| {
|
|
|
|
| ______________________^
|
2023-06-13 08:21:14 -05:00
|
|
|
LL | | return (x, y);
|
|
|
|
LL | | });
|
|
|
|
| |______^ help: remove the call to `map`
|
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-11-11 06:48:26 -06:00
|
|
|
--> $DIR/map_identity.rs:34:22
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
2023-11-11 06:48:26 -06:00
|
|
|
LL | let _ = x.clone().map(|(x, y)| return (x, y));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
|
|
error: unnecessary map of the identity function
|
2023-11-11 06:48:26 -06:00
|
|
|
--> $DIR/map_identity.rs:37:22
|
2023-06-13 08:21:14 -05:00
|
|
|
|
|
2023-11-11 06:48:26 -06:00
|
|
|
LL | let _ = y.clone().map(|(x, y, (z, (w,)))| (x, y, (z, (w,))));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
2023-06-13 08:21:14 -05:00
|
|
|
|
2023-11-11 06:48:26 -06:00
|
|
|
error: unnecessary map of the identity function
|
|
|
|
--> $DIR/map_identity.rs:66:30
|
|
|
|
|
|
|
|
|
LL | let _ = x.iter().copied().map(|(x, y)| (x, y));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: remove the call to `map`
|
|
|
|
|
|
|
|
error: aborting due to 11 previous errors
|
2020-07-14 07:59:59 -05:00
|
|
|
|