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

@@ -310,12 +310,12 @@ extension UniqueArray {
#if compiler(>=6.4) && UnstableContainersPreview
@inlinable
internal mutating func _append<
Source: BorrowingSequence_<Element> & ~Copyable & ~Escapable
Source: Iterable_<Element> & ~Copyable & ~Escapable
>(
copying newElements: borrowing Source
) {
_ensureFreeCapacity(newElements.underestimatedCount_)
var it = newElements.makeBorrowingIterator_()
var it = newElements.makeIterableIterator_()
while true {
let span = it.nextSpan_()
if span.isEmpty { break }
@@ -343,7 +343,7 @@ extension UniqueArray {
@_alwaysEmitIntoClient
@inline(__always)
public mutating func append<
Source: BorrowingSequence_<Element> & ~Copyable & ~Escapable
Source: Iterable_<Element> & ~Copyable & ~Escapable
>(
copying newElements: borrowing Source
) {
@@ -397,7 +397,7 @@ extension UniqueArray {
@_alwaysEmitIntoClient
@inline(__always)
public mutating func append<
Source: BorrowingSequence_<Element> & Sequence<Element>
Source: Iterable_<Element> & Sequence<Element>
>(copying newElements: Source) {
self._append(copying: newElements)
}
@@ -20,16 +20,16 @@ import ContainersPreview
#if compiler(>=6.4) && UnstableContainersPreview
@available(SwiftStdlib 5.0, *)
extension UniqueArray: BorrowingSequence_ where Element: ~Copyable {
public typealias BorrowingIterator_ = RigidArray<Element>.BorrowingIterator_
extension UniqueArray: Iterable_ where Element: ~Copyable {
public typealias IterableIterator_ = RigidArray<Element>.IterableIterator_
@inlinable
public var underestimatedCount_: Int { count }
@_alwaysEmitIntoClient
@inline(__always)
public func makeBorrowingIterator_() -> BorrowingIterator_ {
self._storage.makeBorrowingIterator_()
public func makeIterableIterator_() -> IterableIterator_ {
self._storage.makeIterableIterator_()
}
}
#endif
@@ -96,7 +96,7 @@ extension UniqueArray /*where Element: Copyable*/ {
/// The sequence 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? = nil,
copying contents: borrowing Source
) {
@@ -132,7 +132,7 @@ extension UniqueArray /*where Element: Copyable*/ {
/// - contents: The container whose contents to copy into the new array.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: BorrowingSequence_<Element> & Sequence<Element>>(
public init<Source: Iterable_<Element> & Sequence<Element>>(
capacity: Int? = nil,
copying contents: Source
) {