Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
remove -> swap_remove
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarg66 committed Dec 13, 2023
1 parent 9aede9f commit 2259cbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program-runtime/src/loaded_programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ impl<FG: ForkGraph> LoadedPrograms<FG> {
let (index2, usage_counter2) = random_index_and_usage_counter(&candidates, now);

let (program, entry) = if usage_counter1 < usage_counter2 {
candidates.remove(index1)
candidates.swap_remove(index1)
} else {
candidates.remove(index2)
candidates.swap_remove(index2)
};
self.unload_program_entry(&program, &entry);
}
Expand Down

0 comments on commit 2259cbd

Please sign in to comment.