[BitCollections] BitArray.insert(repeating:count:at:): Fix bogus precondition

This commit is contained in:
Karoy Lorentey committed 2026-05-01 14:34:51 -07:00
1 parent cef6301d19
commit 1447248b49
1 file changed
+1 -1
@@ -38,7 +38,7 @@ extension BitArray {
at index: Int
) {
precondition(count >= 0, "Cannot add a negative number of items")
precondition(index >= 0 && index <= count, "Index out of bounds")
precondition(index >= 0 && index <= self.count, "Index out of bounds")
guard count > 0 else { return }
_extend(by: count, with: false)
_copy(from: index ..< self.count - count, to: index + count)