Rename reallocate to setCapacity for Rigid and UniqueArray

Update UniqueArray.swift

Update UniqueArray.swift
This commit is contained in:
Alejandro Alonso authored and Karoy Lorentey committed 2026-06-17 13:48:53 -07:00
1 parent af174fe447
commit 6da58357a3
6 files changed
+101 -7

No files matched your search

@@ -259,8 +259,8 @@ extension UniqueArray where Element: ~Copyable {
///
/// - Complexity: O(`count`)
@inlinable
public mutating func reallocate(capacity: Int) {
_storage.reallocate(capacity: capacity)
public mutating func setCapacity(_ newCapacity: Int) {
_storage.setCapacity(newCapacity)
}
/// Ensure that the array has capacity to store the specified number of