mirror of
https://github.com/apple/swift-collections
synced 2026-11-26 04:47:48 +00:00
Use Iterable from the Standard Library, replacing the local definition
This commit is contained in:
68 files changed
+565
-921
No files matched your search
@@ -97,11 +97,11 @@ extension UniqueArray /*where Element: Copyable*/ {
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public init<Source: Iterable_ & ~Copyable & ~Escapable>(
|
||||
public init<Source: Iterable & ~Copyable & ~Escapable>(
|
||||
capacity: Int? = nil,
|
||||
copying contents: borrowing Source
|
||||
) throws(Source.Failure_)
|
||||
where Source.Element_ == Element {
|
||||
) throws(Source.Failure)
|
||||
where Source.Element == Element {
|
||||
self.init(minimumCapacity: capacity ?? 0)
|
||||
try self.append(copying: contents)
|
||||
}
|
||||
@@ -135,11 +135,11 @@ extension UniqueArray /*where Element: Copyable*/ {
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public init<Source: Iterable_ & Sequence<Element>>(
|
||||
public init<Source: Iterable & Sequence<Element>>(
|
||||
capacity: Int? = nil,
|
||||
copying contents: Source
|
||||
) throws(Source.Failure_)
|
||||
where Source.Element_ == Element {
|
||||
) throws(Source.Failure)
|
||||
where Source.Element == Element {
|
||||
self.init(minimumCapacity: capacity ?? 0)
|
||||
try self.append(copying: contents)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user