Skip to content

Commit

Permalink
_under_load_factor returns False `if Self._initial_reservation ==…
Browse files Browse the repository at this point in the history
… self._reserved()`

Signed-off-by: rd4com <[email protected]>
  • Loading branch information
rd4com committed Jun 30, 2024
1 parent 59a2543 commit 614feb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/src/collections/dict.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ struct Dict[K: KeyElement, V: CollectionElement](
self._next_index_slot(slot, perturb)

fn _under_load_factor(self) -> Bool:
if self._reserved() == 4: return False
if self._reserved() == Self._initial_reservation: return False
return 3 * self.size < self._reserved()

fn _over_load_factor(self) -> Bool:
Expand Down

0 comments on commit 614feb7

Please sign in to comment.