mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
IterableIterator_ → BorrowingIterator_
This commit is contained in:
36 files changed
+86
-86
No files matched your search
@@ -266,7 +266,7 @@ extension UniqueArray {
|
||||
) throws(Source.Failure_)
|
||||
where Source.Element_ == Element {
|
||||
_ensureFreeCapacity(newElements.underestimatedCount_)
|
||||
var it = newElements.makeIterableIterator_()
|
||||
var it = newElements.makeBorrowingIterator_()
|
||||
while true {
|
||||
let span = try it.nextSpan_()
|
||||
if span.isEmpty { break }
|
||||
|
||||
@@ -21,15 +21,15 @@ import ContainersPreview
|
||||
#if compiler(>=6.4) && UnstableContainersPreview
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: Iterable_ where Element: ~Copyable {
|
||||
public typealias IterableIterator_ = RigidArray<Element>.IterableIterator_
|
||||
public typealias BorrowingIterator_ = RigidArray<Element>.BorrowingIterator_
|
||||
|
||||
@inlinable
|
||||
public var underestimatedCount_: Int { count }
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public func makeIterableIterator_() -> IterableIterator_ {
|
||||
self._storage.makeIterableIterator_()
|
||||
public func makeBorrowingIterator_() -> BorrowingIterator_ {
|
||||
self._storage.makeBorrowingIterator_()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user