mirror of
https://github.com/apple/swift-collections
synced 2026-11-26 04:47:48 +00:00
[BasicContainers] RigidArray, UniqueArray: Gather all public initializers into the same source file
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user