From 258df0792818d6c331ccee923736ea234c24cf07 Mon Sep 17 00:00:00 2001 From: Filip Klembara Date: Thu, 4 Jan 2024 09:05:27 +0100 Subject: [PATCH] Replace less then with less then or equal in removeLast(_:) and removeFirst (_BTree) --- .../BTree/_BTree+Partial RangeReplaceableCollection.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift b/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift index 57eada02..03c6640d 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..