Skip to content

Commit 100c4b4

Browse files
authored
use refs in MgsUpdateDriverStatus IdOrdItem impls (#8477)
1 parent 1858edb commit 100c4b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nexus/mgs-updates/src/driver.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ impl MgsUpdateDriver {
283283
// Update the status to reflect that.
284284
self.status_tx.send_modify(|driver_status| {
285285
for baseboard_id in &to_stop_waiting {
286-
driver_status.waiting.remove(baseboard_id);
286+
driver_status.waiting.remove(&**baseboard_id);
287287
}
288288
});
289289

@@ -441,7 +441,7 @@ impl MgsUpdateDriver {
441441
// Update the overall status to reflect all these changes.
442442
self.status_tx.send_modify(|driver_status| {
443443
// Remove this item from the list of in-progress attempts.
444-
let found = driver_status.in_progress.remove(&baseboard_id);
444+
let found = driver_status.in_progress.remove(&*baseboard_id);
445445
assert!(found.is_some());
446446

447447
// Add this item to the list of requests waiting to be retried.
@@ -474,7 +474,7 @@ impl MgsUpdateDriver {
474474
.expect("waiting request for expired retry timer");
475475
// Update the external status to reflect that.
476476
self.status_tx.send_modify(|driver_status| {
477-
driver_status.waiting.remove(&baseboard_id);
477+
driver_status.waiting.remove(&*baseboard_id);
478478
});
479479

480480
// Find the current configuration for this request.
@@ -580,7 +580,7 @@ impl UpdateAttemptStatusUpdater {
580580
// in the `in_progress` struct until it completes. Thus, we should
581581
// always have a value here.
582582
let mut my_status =
583-
driver_status.in_progress.get_mut(&self.baseboard_id).unwrap();
583+
driver_status.in_progress.get_mut(&*self.baseboard_id).unwrap();
584584
my_status.status = new_status;
585585
});
586586
}

nexus/types/src/internal_api/views.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ pub struct InProgressUpdateStatus {
461461
}
462462

463463
impl IdOrdItem for InProgressUpdateStatus {
464-
type Key<'a> = &'a Arc<BaseboardId>;
464+
type Key<'a> = &'a BaseboardId;
465465

466466
fn key(&self) -> Self::Key<'_> {
467467
&self.baseboard_id
@@ -495,7 +495,7 @@ pub struct WaitingStatus {
495495
}
496496

497497
impl IdOrdItem for WaitingStatus {
498-
type Key<'a> = &'a Arc<BaseboardId>;
498+
type Key<'a> = &'a BaseboardId;
499499

500500
fn key(&self) -> Self::Key<'_> {
501501
&self.baseboard_id

0 commit comments

Comments
 (0)