We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf1d8ff commit 0463690Copy full SHA for 0463690
Ordered Set/OrderedSet.swift
@@ -16,7 +16,7 @@ public class OrderedSet<T: Hashable> {
16
17
// O(n)
18
public func insert(_ object: T, at index: Int) {
19
- assert(index < objects.count, "Index should be smaller than object count")
+ assert(index <= objects.count, "Index should be smaller than object count")
20
assert(index >= 0, "Index should be bigger than 0")
21
22
guard indexOfKey[object] == nil else {
0 commit comments