devices: replace .into_iter() on ref with .iter()

Fixes clippy warning:

  this `.into_iter()` call is equivalent to `.iter()` and will not
  consume the `slice`

https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref

BUG=None
TEST=bin/clippy

Change-Id: Id31c3f6252b86a7f453ab4e6e7dac0ed6654bc52
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2885782
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Daniel Verkamp 2021-05-07 12:53:41 -07:00 committed by Commit Bot
parent 358101242a
commit 15fadba6ea
3 changed files with 2 additions and 3 deletions

View file

@ -34,7 +34,6 @@ SUPPRESS=(
extra_unused_lifetimes
for_kv_map
inefficient_to_string
into_iter_on_ref
let_unit_value
missing_safety_doc
needless_range_loop

View file

@ -183,7 +183,7 @@ impl DecoderSession for libvda::decode::Session {
planes: &[FramePlane],
modifier: u64,
) -> VideoResult<()> {
let vda_planes: Vec<libvda::FramePlane> = planes.into_iter().map(Into::into).collect();
let vda_planes: Vec<libvda::FramePlane> = planes.iter().map(Into::into).collect();
Ok(self.use_output_buffer(
picture_buffer_id,
libvda::PixelFormat::try_from(format)?,

View file

@ -628,7 +628,7 @@ impl<T: Encoder> EncoderDevice<T> {
let resource_info = get_resource_info(resource_bridge, uuid)?;
let planes: Vec<VideoFramePlane> = resource_info.planes[0..num_planes]
.into_iter()
.iter()
.map(|plane_info| VideoFramePlane {
offset: plane_info.offset as usize,
stride: plane_info.stride as usize,