mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
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:)`.