Renaming BorrowingSequence_ to Iterable_

This commit is contained in:
Nate Cook authored and Karoy Lorentey committed 2026-06-17 14:27:29 -07:00
1 parent 232e6aeacf
commit 4bda43f4a9
53 files changed
+197 -197

No files matched your search

@@ -349,7 +349,7 @@ extension RigidArray {
#if compiler(>=6.4) && UnstableContainersPreview
@inlinable
internal mutating func _append<
Source: BorrowingSequence_<Element> & ~Copyable & ~Escapable
Source: Iterable_<Element> & ~Copyable & ~Escapable
>(
copying newElements: borrowing Source
) {
@@ -371,7 +371,7 @@ extension RigidArray {
@_alwaysEmitIntoClient
@inline(__always)
public mutating func append<
Source: BorrowingSequence_<Element> & ~Copyable & ~Escapable
Source: Iterable_<Element> & ~Copyable & ~Escapable
>(
copying newElements: borrowing Source
) {
@@ -413,7 +413,7 @@ extension RigidArray {
@_alwaysEmitIntoClient
@inline(__always)
public mutating func append<
Source: BorrowingSequence_<Element> & Sequence<Element>
Source: Iterable_<Element> & Sequence<Element>
>(copying newElements: Source) {
_append(copying: newElements)
}
@@ -20,11 +20,11 @@ import ContainersPreview
#if compiler(>=6.4) && UnstableContainersPreview
@available(SwiftStdlib 5.0, *)
extension RigidArray: BorrowingSequence_ where Element: ~Copyable {
public typealias BorrowingIterator_ = SpanIterator<Element>
extension RigidArray: Iterable_ where Element: ~Copyable {
public typealias IterableIterator_ = SpanIterator<Element>
@_alwaysEmitIntoClient
@inline(__always)
public func makeBorrowingIterator_() -> BorrowingIterator_ {
public func makeIterableIterator_() -> IterableIterator_ {
SpanIterator(self.span)
}
}
@@ -124,7 +124,7 @@ extension RigidArray /*where Element: Copyable*/ {
/// The container must not contain more than `capacity` elements.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: BorrowingSequence_<Element> & ~Copyable & ~Escapable>(
public init<Source: Iterable_<Element> & ~Copyable & ~Escapable>(
capacity: Int,
copying contents: borrowing Source
) {
@@ -145,7 +145,7 @@ extension RigidArray /*where Element: Copyable*/ {
/// The container must not contain more than `capacity` elements.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: BorrowingSequence_<Element> & Sequence<Element>>(
public init<Source: Iterable_<Element> & Sequence<Element>>(
capacity: Int,
copying contents: Source
) {
@@ -415,7 +415,7 @@ extension RigidArray {
copying items: borrowing C,
newCount: Int
) {
var it = items.makeBorrowingIterator_()
var it = items.makeIterableIterator_()
insert(addingCount: newCount, at: index) { target in
while !target.isFull {
let source = it.nextSpan_(maximumCount: target.freeCapacity)
@@ -591,7 +591,7 @@ extension RigidArray {
copyingContainer items: borrowing C,
newCount: Int
) {
var it = items.makeBorrowingIterator_()
var it = items.makeIterableIterator_()
self.replace(removing: subrange, addingCount: newCount) { target in
while !target.isFull {
let source = it.nextSpan_(maximumCount: target.freeCapacity)