sim: Clarify condition
Clippy suggests using an if instead of using a map on an option.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/mcuboot-sys/src/c.rs b/sim/mcuboot-sys/src/c.rs
index eb5f90f..549c48a 100644
--- a/sim/mcuboot-sys/src/c.rs
+++ b/sim/mcuboot-sys/src/c.rs
@@ -30,7 +30,9 @@
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);
}