IterableIterator_ → BorrowingIterator_

This commit is contained in:
Karoy Lorentey committed 2026-07-07 14:21:53 -07:00
1 parent c54ce4c368
commit d0b4c4c215
36 files changed
+86 -86

No files matched your search

@@ -21,7 +21,7 @@ import ContainersPreview
@available(SwiftStdlib 5.0, *)
extension UniqueSet: Iterable_ where Element: ~Copyable {
public typealias Element_ = Element
public typealias IterableIterator_ = RigidSet<Element>.IterableIterator_
public typealias BorrowingIterator_ = RigidSet<Element>.BorrowingIterator_
@inlinable
public var underestimatedCount_: Int { count }
@@ -35,8 +35,8 @@ extension UniqueSet: Iterable_ where Element: ~Copyable {
@inlinable
@_lifetime(borrow self)
public borrowing func makeIterableIterator_() -> IterableIterator_ {
IterableIterator_(_set: _storage)
public borrowing func makeBorrowingIterator_() -> BorrowingIterator_ {
BorrowingIterator_(_set: _storage)
}
}
#endif
@@ -139,7 +139,7 @@ extension UniqueSet /* where Element: Copyable */ {
) throws(S.Failure_)
where S.Element_ == Element {
_ensureFreeCapacity(items.underestimatedCount_)
var it = items.makeIterableIterator_()
var it = items.makeBorrowingIterator_()
while true {
let span = try it.nextSpan_()
guard !span.isEmpty else { break }