Skip to content

Commit 43ec488

Browse files
lzrdmkeeter
andauthored
Update drv/lpc55-update-server/src/main.rs
Co-authored-by: Matt Keeter <[email protected]>
1 parent 578f393 commit 43ec488

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drv/lpc55-update-server/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,8 @@ impl idl::InOrderUpdateImpl for ServerImpl<'_> {
529529
}
530530
// If there is a pending persistent preference, it must
531531
// not select the update target.
532-
if let Some(pref) = pending_persistent {
533-
if slot == pref {
534-
return Err(UpdateError::InvalidPreferredSlotId.into());
535-
}
532+
if pending_persistent == Some(slot) {
533+
return Err(UpdateError::InvalidPreferredSlotId.into());
536534
} else if slot == persistent {
537535
// If there is no pending persistent preference, then the
538536
// persistent preference must select the currently active image.

0 commit comments

Comments
 (0)