File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,10 @@ LL | let v2: Vec<isize> = v.iter().cloned().collect();
8787 = note: `-D clippy::iter-cloned-collect` implied by `-D warnings`
8888
8989error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
90- --> $DIR/unnecessary_clone.rs:71:39
90+ --> $DIR/unnecessary_clone.rs:71:38
9191 |
92- LL | let _ : Vec<isize> = vec![1, 2, 3].iter().cloned().collect();
93- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
92+ LL | let _: Vec<isize> = vec![1, 2, 3].iter().cloned().collect();
93+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
9494
9595error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
9696 --> $DIR/unnecessary_clone.rs:76:24
You can’t perform that action at this time.
0 commit comments