Skip to content

Commit

Permalink
driveby: fix use of indexmap remove
Browse files Browse the repository at this point in the history
We do care about the order of things in this
set, in general, so use `shift_remove`.
  • Loading branch information
nikomatsakis committed Apr 2, 2024
1 parent 39321ed commit e81b223
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/salsa-2022/src/runtime/active_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl ActiveQuery {
pub(super) fn remove_cycle_participants(&mut self, cycle: &Cycle) {
for p in cycle.participant_keys() {
let p: DependencyIndex = p.into();
self.input_outputs.remove(&(EdgeKind::Input, p));
self.input_outputs.shift_remove(&(EdgeKind::Input, p));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ impl ActiveQuery {
fn remove_cycle_participants(&mut self, cycle: &Cycle) {
if let Some(my_dependencies) = &mut self.dependencies {
for p in cycle.participant_keys() {
my_dependencies.remove(&p);
my_dependencies.shift_remove(&p);
}
}
}
Expand Down

0 comments on commit e81b223

Please sign in to comment.