diff --git a/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift b/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift index 57eada023..03c6640df 100644 --- a/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift +++ b/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift @@ -58,7 +58,7 @@ extension _BTree { @inlinable @inline(__always) public mutating func removeLast(_ k: Int) { - assert(0 <= k && k < self.count, "Can't remove more items from a collection than it contains") + assert(0 <= k && k <= self.count, "Can't remove more items from a collection than it contains") for _ in 0..