[BasicContainers] RigidArray, UniqueArray: Gather all public initializers into the same source file

This commit is contained in:
Karoy Lorentey committed 2026-02-03 13:20:09 -08:00
1 parent 0c376aceb6
commit 3d4423f33e
4 files changed
+47 -30

No files matched your search

@@ -63,16 +63,9 @@ public struct UniqueArray<Element: ~Copyable>: ~Copyable {
@usableFromInline
internal var _storage: RigidArray<Element>
/// Initializes a new unique array with the specified capacity and no elements.
@inlinable
public init(capacity: Int) {
_storage = .init(capacity: capacity)
}
/// Initializes a new unique array with no elements.
@inlinable
public init() {
_storage = .init(capacity: 0)
@_alwaysEmitIntoClient
package init(_storage: consuming RigidArray<Element>) {
self._storage = _storage
}
}