Skip to content

Commit

Permalink
Do not use deprecated function.
Browse files Browse the repository at this point in the history
  • Loading branch information
01mf02 committed May 23, 2024
1 parent 011764a commit ffffeb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jaq-interpret/src/val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ impl ValT for Val {
Occupied(mut e) => {
match f(e.get().clone()).next().transpose()? {
Some(y) => e.insert(y),
None => e.remove(),
// this runs in constant time, at the price of
// changing the order of the elements
None => e.swap_remove(),
};
}
Vacant(e) => {
Expand Down

0 comments on commit ffffeb5

Please sign in to comment.