2019-09-25 17:46:14 +00:00
|
|
|
error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
|
|
|
|
--> $DIR/iter_cloned_collect.rs:10:27
|
|
|
|
|
|
|
|
|
LL | let v2: Vec<isize> = v.iter().cloned().collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::iter-cloned-collect` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
|
|
|
|
--> $DIR/iter_cloned_collect.rs:15:38
|
|
|
|
|
|
|
|
|
LL | let _: Vec<isize> = vec![1, 2, 3].iter().cloned().collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
|
|
|
|
|
|
|
|
error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
|
|
|
|
--> $DIR/iter_cloned_collect.rs:20:24
|
|
|
|
|
|
|
|
|
LL | .to_bytes()
|
|
|
|
| ________________________^
|
|
|
|
LL | | .iter()
|
|
|
|
LL | | .cloned()
|
|
|
|
LL | | .collect();
|
|
|
|
| |______________________^ help: try: `.to_vec()`
|
|
|
|
|
2021-04-26 20:03:51 +00:00
|
|
|
error: called `iter().cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
|
|
|
|
--> $DIR/iter_cloned_collect.rs:28:24
|
|
|
|
|
|
|
|
|
LL | let _: Vec<_> = arr.iter().cloned().collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
|
|
|
|
|
2021-11-20 09:53:15 +00:00
|
|
|
error: called `iter().copied().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable
|
|
|
|
--> $DIR/iter_cloned_collect.rs:31:26
|
|
|
|
|
|
|
|
|
LL | let _: Vec<isize> = v.iter().copied().collect();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2019-09-25 17:46:14 +00:00
|
|
|
|