mirror of
https://github.com/apple/swift-collections
synced 2026-11-26 04:47:48 +00:00
Container: Add makeBorrowingIterator(from:) and currentIndex(of:) requirements
This commit is contained in:
12 files changed
+186
-19
No files matched your search
@@ -36,7 +36,20 @@ extension UniqueArray: Iterable_ where Element: ~Copyable {
|
||||
|
||||
#if compiler(>=6.4) && UnstableContainersPreview
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: Container where Element: ~Copyable {}
|
||||
extension UniqueArray: Container where Element: ~Copyable {
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(borrow self)
|
||||
public func makeBorrowingIterator(
|
||||
from start: Index
|
||||
) -> BorrowingIterator_ {
|
||||
_storage.makeBorrowingIterator(from: start)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
public func currentIndex(of iterator: borrowing BorrowingIterator_) -> Index {
|
||||
_storage.currentIndex(of: iterator)
|
||||
}
|
||||
}
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: BidirectionalContainer where Element: ~Copyable {}
|
||||
|
||||
Reference in new issue
Block a user