mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
IterableIterator_ → BorrowingIterator_
This commit is contained in:
36 files changed
+86
-86
No files matched your search
@@ -21,10 +21,10 @@ import ContainersPreview
|
||||
#if compiler(>=6.4) && UnstableContainersPreview
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidArray: Iterable_ where Element: ~Copyable {
|
||||
public typealias IterableIterator_ = SpanIterator<Element>
|
||||
public typealias BorrowingIterator_ = SpanIterator<Element>
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public func makeIterableIterator_() -> IterableIterator_ {
|
||||
public func makeBorrowingIterator_() -> BorrowingIterator_ {
|
||||
SpanIterator(self.span)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ extension RigidArray {
|
||||
copyingContainer items: borrowing C,
|
||||
newCount: Int
|
||||
) {
|
||||
var it = items.makeIterableIterator_()
|
||||
var it = items.makeBorrowingIterator_()
|
||||
self.replace(removing: subrange, addingCount: newCount) { target in
|
||||
while !target.isFull {
|
||||
let source = it.nextSpan_(maxCount: target.freeCapacity)
|
||||
|
||||
Reference in new issue
Block a user