Commit 80f836d1 authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Remove complexity from an if



Clippy suggests that having a closure in the condition of an if can be
confusing in regards to code formatting.  Move the conditional outside
of the if into a temp variable.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent d36f6b1c
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1564,11 +1564,14 @@ fn install_ptable(flash: &mut SimMultiFlash, areadesc: &AreaDesc) {
        // aren't marked as the BootLoader partition, avoid adding the
        // partition table.  This makes it harder to view the image, but
        // avoids messing up images already written.
        if areadesc.iter_areas().any(|area| {
        let skip_ptable = areadesc
            .iter_areas()
            .any(|area| {
                area.device_id == id &&
                    area.off == 0 &&
                    area.flash_id != FlashId::BootLoader
        }) {
            });
        if skip_ptable {
            if log_enabled!(Info) {
                let special: Vec<FlashId> = areadesc.iter_areas()
                    .filter(|area| area.device_id == id && area.off == 0)