Replace Container with a far less powerful (but more universal) Iterable construct

I’m hoping Container will return later.
This commit is contained in:
Karoy Lorentey committed 2026-01-08 17:28:23 -08:00
1 parent ec3fef1899
commit 67abaf5182
26 files changed
+1071 -413

No files matched your search

+6 -2
View File
@@ -177,12 +177,16 @@ extension UniqueArray where Element: ~Copyable {
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
@available(SwiftStdlib 5.0, *)
extension UniqueArray: Container where Element: ~Copyable {
extension UniqueArray: Iterable where Element: ~Copyable {
public typealias BorrowIterator = RigidArray<Element>.BorrowIterator
public var estimatedCount: ContainersPreview.EstimatedCount {
.exactly(count)
}
@_alwaysEmitIntoClient
@inline(__always)
public func startBorrowIteration() -> Span<Element> {
public func startBorrowIteration() -> BorrowIterator {
self._storage.startBorrowIteration()
}
}