File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
drv/lpc55-update-server/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -524,17 +524,13 @@ impl idl::InOrderUpdateImpl for ServerImpl<'_> {
524524 self . boot_preferences ( ) ?;
525525
526526 // The transient preference must not select the update target.
527- if let Some ( pref) = transient {
528- if slot == pref {
529- return Err ( UpdateError :: InvalidPreferredSlotId . into ( ) ) ;
530- }
527+ if transient == Some ( slot) {
528+ return Err ( UpdateError :: InvalidPreferredSlotId . into ( ) ) ;
531529 }
532530 // If there is a pending persistent preference, it must
533531 // not select the update target.
534- if let Some ( pref) = pending_persistent {
535- if slot == pref {
536- return Err ( UpdateError :: InvalidPreferredSlotId . into ( ) ) ;
537- }
532+ if pending_persistent == Some ( slot) {
533+ return Err ( UpdateError :: InvalidPreferredSlotId . into ( ) ) ;
538534 } else if slot == persistent {
539535 // If there is no pending persistent preference, then the
540536 // persistent preference must select the currently active image.
You can’t perform that action at this time.
0 commit comments