Merge remote-tracking branch 'origin/main' into github-actions-ci-support

This commit is contained in:
Mishal Shah committed 2024-10-24 23:07:38 -07:00
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))
+1 -2
View File
@@ -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)