Skip to content

Commit f0a95e5

Browse files
committed
Merge remote-tracking branch 'origin/main' into github-actions-ci-support
2 parents 4ceb214 + 54e9986 commit f0a95e5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ extension _BTree {
487487
if shouldStop { break }
488488
}
489489

490-
assert(slot != -1, "B-Tree sanity check fail.")
490+
assert(slot != -1)
491491

492492
parents.append(node)
493493
slots.append(UInt16(slot))

Sources/SortedCollections/BTree/_BTree.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ extension _BTree {
513513
node.read({ handle in
514514
let slot = handle.endSlot(forKey: key) - 1
515515
if slot > 0 {
516-
// Sanity Check
517-
assert(slot < handle.elementCount, "Slot out of bounds.")
516+
assert(slot < handle.elementCount, "Slot out of bounds")
518517

519518
if handle.isLeaf {
520519
offset += slot

Sources/SortedCollections/BTree/_Node.UnsafeHandle+Deletion.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ extension _Node.UnsafeHandle {
5757
// not exist.
5858
return nil
5959
} else {
60-
// Sanity-check
61-
assert(slot < self.childCount, "Attempt to remove from invalid child.")
60+
assert(slot < self.childCount, "Attempt to remove from invalid child")
6261

6362
let removedElement = self[childAt: slot].update({
6463
$0.removeAnyElement(forKey: key)

0 commit comments

Comments
 (0)