Files
swift-collections/Sources/BasicContainers
Sandeep Vijayarao 9a699a1952 [BasicContainers] Don't resolve the hole before shrinking in UniqueDictionary
Resolves the FIXME added in #836: when removing an entry through
`updateValue(forKey:with:)` triggers shrinking, there is no need to
restore the hash table's invariants first, since resizing rehashes every
item anyway.

Factor the part of `RigidDictionary._punchHole(at:)` that doesn't touch
the value slot into `_punchHole(withMovedValueAt:)`, and use it on the
shrink path of `UniqueDictionary._removeEntry(withMovedValueAt:)`, which
now mirrors `_removeValue(at:)`.
2026-11-05 18:54:31 -08:00
..