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 1ddf99a commit ea6ae67Copy full SHA for ea6ae67
stdlib/public/core/NativeSet.swift
@@ -362,7 +362,7 @@ extension _NativeSet { // Insertions
362
/// The `element` must not be already present in the Set.
363
@inlinable
364
internal func _unsafeInsertNew(_ element: __owned Element) {
365
- _precondition(count < capacity)
+ _internalInvariant(count + 1 <= capacity)
366
let hashValue = self.hashValue(for: element)
367
if _isDebugAssertConfiguration() {
368
// In debug builds, perform a full lookup and trap if we detect duplicate
0 commit comments