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
@@ -234,7 +234,9 @@ extension RigidArray where Element: ~Copyable {
|
||||
>(
|
||||
addingCount newItemCount: Int,
|
||||
from producer: inout P
|
||||
) throws(E) {
|
||||
) throws(E)
|
||||
where P.Element: ~Copyable
|
||||
{
|
||||
try self.append(addingCount: newItemCount) { target throws(E) in
|
||||
while !target.isFull {
|
||||
guard try producer.generate(into: &target) else { break }
|
||||
@@ -261,7 +263,9 @@ extension RigidArray 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 {
|
||||
try self.append(addingCount: freeCapacity) { target throws(E) in
|
||||
|
||||
@@ -304,7 +304,9 @@ extension RigidArray where Element: ~Copyable {
|
||||
addingCount newItemCount: Int,
|
||||
from producer: inout P,
|
||||
at index: Int
|
||||
) throws(E) {
|
||||
) throws(E)
|
||||
where P.Element: ~Copyable
|
||||
{
|
||||
try insert(addingCount: newItemCount, at: index) { target throws(E) in
|
||||
while !target.isFull, try producer.generate(into: &target) {
|
||||
// Do nothing
|
||||
|
||||
@@ -454,7 +454,9 @@ extension RigidArray where Element: ~Copyable {
|
||||
removing subrange: Range<Int>,
|
||||
addingCount newItemCount: Int,
|
||||
from producer: inout P
|
||||
) throws(E) {
|
||||
) throws(E)
|
||||
where P.Element: ~Copyable
|
||||
{
|
||||
try replace(
|
||||
removing: subrange,
|
||||
addingCount: newItemCount
|
||||
|
||||
Reference in new issue
Block a user