summary refs log tree commit diff
path: root/aarch64
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2019-04-15 16:58:42 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-18 19:51:01 -0700
commitdc4effa72b214bc3bd14ca2f7772ab1b728aef5b (patch)
tree61c308a8c165a6fbe65f947da4abd241a9dd265d /aarch64
parent64cd5eae5778b86f6e498a6fa1b1962693aa5a46 (diff)
downloadcrosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar.gz
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar.bz2
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar.lz
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar.xz
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.tar.zst
crosvm-dc4effa72b214bc3bd14ca2f7772ab1b728aef5b.zip
clippy: Iterate without calling .iter()
See:
https://rust-lang.github.io/rust-clippy/master/index.html#explicit_iter_loop
https://rust-lang.github.io/rust-clippy/master/index.html#explicit_into_iter_loop

Before:

    for element in slice.iter() {...}

After:

    for element in slice {...}

TEST=grep -r '\.iter() {'
TEST=grep -r '\.iter_mut() {'
TEST=grep -r '\.into_iter() {'
TEST=cargo check --all-features
TEST=local kokoro

Change-Id: I27f0df7cfa1064b2c8b162cba263513926a433a9
Reviewed-on: https://chromium-review.googlesource.com/1568525
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'aarch64')
-rw-r--r--aarch64/src/fdt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/aarch64/src/fdt.rs b/aarch64/src/fdt.rs
index 98cadc4..3b0126f 100644
--- a/aarch64/src/fdt.rs
+++ b/aarch64/src/fdt.rs
@@ -114,7 +114,7 @@ fn create_timer_node(fdt: &mut Vec<u8>, num_cpus: u32) -> Result<()> {
         (((1 << num_cpus) - 1) << GIC_FDT_IRQ_PPI_CPU_SHIFT) & GIC_FDT_IRQ_PPI_CPU_MASK;
 
     let mut timer_reg_cells = Vec::new();
-    for &irq in irqs.iter() {
+    for &irq in &irqs {
         timer_reg_cells.push(GIC_FDT_IRQ_TYPE_PPI);
         timer_reg_cells.push(irq);
         timer_reg_cells.push(cpu_mask | IRQ_TYPE_LEVEL_LOW);