mirror of
https://github.com/apple/swift-collections
synced 2026-11-22 04:20:40 +00:00
UnsafeCursor.removeElement(hasValueHole:) only collapsed an empty root inside the loop that walks up the cursor's path, which never runs when the removed key is in the root. Removing such a key with d[key].take() could leave the root as an internal node with no keys and one child. Collapse the root after the loop so every path depth is covered. Fixes #811