mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
Iterable → BorrowingSequence, BorrowIterator → BorrowingIterator
This commit is contained in:
24 files changed
+287
-187
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user