mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
[BasicContainers, ContainersPreview, DequeModule] More SuppressedAssociatedTypesWithDefaults fixups
This commit is contained in:
26 files changed
+129
-42
No files matched your search
@@ -57,7 +57,9 @@ extension UniqueSet where Element: ~Copyable {
|
||||
P: Producer<Element, E> & ~Copyable & ~Escapable
|
||||
>(
|
||||
minimumCapacity: Int? = nil, from producer: inout P
|
||||
) throws(E) {
|
||||
) throws(E)
|
||||
where P.Element: ~Copyable
|
||||
{
|
||||
let c = producer.underestimatedCount
|
||||
if let minimumCapacity {
|
||||
self.init(minimumCapacity: Swift.min(minimumCapacity, c))
|
||||
|
||||
@@ -86,7 +86,9 @@ extension UniqueSet where Element: ~Copyable {
|
||||
P: Producer<Element, E> & ~Copyable & ~Escapable
|
||||
>(
|
||||
from producer: inout P
|
||||
) throws(E) {
|
||||
) throws(E)
|
||||
where P.Element: ~Copyable
|
||||
{
|
||||
var done = false
|
||||
while !done {
|
||||
_ensureFreeCapacity(Swift.max(producer.underestimatedCount, 1))
|
||||
|
||||
Reference in new issue
Block a user