mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
Merge remote-tracking branch 'origin/main' into github-actions-ci-support
This commit is contained in:
commit
f0a95e596c
3 files changed
+3
-5
No files matched your search
@@ -487,7 +487,7 @@ extension _BTree {
|
||||
if shouldStop { break }
|
||||
}
|
||||
|
||||
assert(slot != -1, "B-Tree sanity check fail.")
|
||||
assert(slot != -1)
|
||||
|
||||
parents.append(node)
|
||||
slots.append(UInt16(slot))
|
||||
|
||||
@@ -513,8 +513,7 @@ extension _BTree {
|
||||
node.read({ handle in
|
||||
let slot = handle.endSlot(forKey: key) - 1
|
||||
if slot > 0 {
|
||||
// Sanity Check
|
||||
assert(slot < handle.elementCount, "Slot out of bounds.")
|
||||
assert(slot < handle.elementCount, "Slot out of bounds")
|
||||
|
||||
if handle.isLeaf {
|
||||
offset += slot
|
||||
|
||||
@@ -57,8 +57,7 @@ extension _Node.UnsafeHandle {
|
||||
// not exist.
|
||||
return nil
|
||||
} else {
|
||||
// Sanity-check
|
||||
assert(slot < self.childCount, "Attempt to remove from invalid child.")
|
||||
assert(slot < self.childCount, "Attempt to remove from invalid child")
|
||||
|
||||
let removedElement = self[childAt: slot].update({
|
||||
$0.removeAnyElement(forKey: key)
|
||||
|
||||
Reference in new issue
Block a user