mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
Iterable → BorrowingSequence, BorrowIterator → BorrowingIterator
This commit is contained in:
24 files changed
+287
-187
No files matched your search
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift Collections open source project
|
||||
//
|
||||
// Copyright (c) 2024 - 2025 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2024 - 2026 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
@@ -177,8 +177,8 @@ extension UniqueArray where Element: ~Copyable {
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray: Iterable where Element: ~Copyable {
|
||||
public typealias BorrowIterator = RigidArray<Element>.BorrowIterator
|
||||
extension UniqueArray: BorrowingSequence where Element: ~Copyable {
|
||||
public typealias BorrowingIterator = RigidArray<Element>.BorrowingIterator
|
||||
|
||||
public var estimatedCount: ContainersPreview.EstimatedCount {
|
||||
.exactly(count)
|
||||
@@ -186,8 +186,8 @@ extension UniqueArray: Iterable where Element: ~Copyable {
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@inline(__always)
|
||||
public func startBorrowIteration() -> BorrowIterator {
|
||||
self._storage.startBorrowIteration()
|
||||
public func makeBorrowingIterator() -> BorrowingIterator {
|
||||
self._storage.makeBorrowingIterator()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user