mirror of
https://github.com/apple/swift-collections
synced 2026-11-27 04:54:21 +00:00
previousSpan(before:maxCount:) ⟹ spanBoundary(before:maxDistance:)
This allows MutableContainers to support mutating iteration backwards without requiring a separate MutableBidirectionalContainer protocol.
This commit is contained in:
9 files changed
+62
-29
No files matched your search
@@ -400,6 +400,11 @@ extension UniqueArray where Element: ~Copyable {
|
||||
_storage.nextMutableSpan(after: &index, maxCount: maxCount)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
public func spanBoundary(before index: Index, maxDistance: Int) -> Index? {
|
||||
_storage.spanBoundary(before: index, maxDistance: maxDistance)
|
||||
}
|
||||
|
||||
@inlinable
|
||||
@_lifetime(borrow self)
|
||||
public func previousSpan(
|
||||
|
||||
Reference in new issue
Block a user