sim: Combine a split conditional
Instead of nesting ifs, just use the conditional with an and operator.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/src/image.rs b/sim/src/image.rs
index 37c59ad..6095ba4 100644
--- a/sim/src/image.rs
+++ b/sim/src/image.rs
@@ -512,12 +512,10 @@
fails += 1;
}
- if self.is_swap_upgrade() {
- if !self.verify_images(&flash, 1, 0) {
- warn!("Secondary slot FAIL at step {} of {}",
- i, total_flash_ops);
- fails += 1;
- }
+ if self.is_swap_upgrade() && !self.verify_images(&flash, 1, 0) {
+ warn!("Secondary slot FAIL at step {} of {}",
+ i, total_flash_ops);
+ fails += 1;
}
}