Closed
Description
For the following code:
fn main() {
let start = 0;
let fin = 10;
let vals: Vec<i32> = (start..fin).map(|v| v * v).collect();
println!("{:?}", vals);
}
Clippy warns:
warning: redundant field names in struct initialization
--> src/main.rs:4:27
|
4 | let vals: Vec<i32> = (start..fin).map(|v| v * v).collect();
| ^^^^^ help: replace it with: `start`
|
= note: #[warn(redundant_field_names)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.204/index.html#redundant_field_names
Is this a legitimate lint?