Commit fbc8f7c1 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Directly iterate instead of using an index



From a clippy suggestion, replace an index iterator over a slice, and
directly use a mutable iterator over the slice.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent aec56b2b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1130,7 +1130,7 @@ impl Images {
        let mut rng = rand::thread_rng();
        let mut resets = vec![0i32; count];
        let mut remaining_ops = total_ops;
        for i in 0 .. count {
        for reset in &mut resets {
            let reset_counter = rng.gen_range(1, remaining_ops / 2);
            let mut counter = reset_counter;
            match c::boot_go(&mut flash, &self.areadesc, Some(&mut counter), false) {
@@ -1138,7 +1138,7 @@ impl Images {
                (x, _) => panic!("Unknown return: {}", x),
            }
            remaining_ops -= reset_counter;
            resets[i] = reset_counter;
            *reset = reset_counter;
        }

        match c::boot_go(&mut flash, &self.areadesc, None, false) {