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 = v.iter().cloned().collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` | = note: `-D clippy::iter-cloned-collect` implied by `-D warnings` error: non-binding let on a type that implements `Drop` --> $DIR/iter_cloned_collect.rs:15:5 | LL | let _: Vec = vec![1, 2, 3].iter().cloned().collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[deny(clippy::let_underscore_drop)]` on by default = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` 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 = vec![1, 2, 3].iter().cloned().collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.to_vec()` error: non-binding let on a type that implements `Drop` --> $DIR/iter_cloned_collect.rs:19:9 | LL | / let _: Vec = std::ffi::CStr::from_ptr(std::ptr::null()) LL | | .to_bytes() LL | | .iter() LL | | .cloned() LL | | .collect(); | |_______________________^ | = help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop` 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()` error: aborting due to 5 previous errors