Commit 8608c53f authored by David Brown's avatar David Brown Committed by David Brown
Browse files

sim: Clarify condition

Clippy suggests using an if instead of using a map on an option.

Signed-off-by: default avatarDavid Brown <david.brown@linaro.org>
parent 4bbb93d9
Loading
Loading
Loading
Loading
+3 −1
Changes for sim/mcuboot-sys/src/c.rs: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -30,7 +30,9 @@ pub fn boot_go(multiflash: &mut SimMultiFlash, areadesc: &AreaDesc,
        raw::invoke_boot_go(&mut sim_ctx as *mut _, &areadesc.get_c() as *const _) as i32
    };
    let asserts = sim_ctx.c_asserts;
    counter.map(|c| *c = sim_ctx.flash_counter);
    if let Some(c) = counter {
        *c = sim_ctx.flash_counter;
    }
    for &dev_id in multiflash.keys() {
        api::clear_flash(dev_id);
    }