Iterable → BorrowingSequence, BorrowIterator → BorrowingIterator

This commit is contained in:
Karoy Lorentey committed 2026-01-25 16:42:37 -08:00
1 parent fabe5d8c87
commit e4aba4c1c9
24 files changed
+287 -187

No files matched your search

+3 -3
View File
@@ -286,9 +286,9 @@ extension RigidArray where Element: ~Copyable {
#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
@available(SwiftStdlib 5.0, *)
extension RigidArray: Iterable where Element: ~Copyable {
extension RigidArray: BorrowingSequence where Element: ~Copyable {
@frozen
public struct BorrowIterator: ~Copyable, ~Escapable, BorrowIteratorProtocol {
public struct BorrowingIterator: ~Copyable, ~Escapable, BorrowingIteratorProtocol {
@usableFromInline
internal let _span: Span<Element>
@@ -327,7 +327,7 @@ extension RigidArray: Iterable where Element: ~Copyable {
@_alwaysEmitIntoClient
@inline(__always)
public func startBorrowIteration() -> BorrowIterator {
public func makeBorrowingIterator() -> BorrowingIterator {
.init(_span: self.span, offset: 0)
}
}