mirror of
https://github.com/apple/swift-collections
synced 2026-11-27 04:54:21 +00:00
Introduce Container.nextSpan(after:maxCount:limitedBy:) and make it the core Container primitive
This commit is contained in:
13 files changed
+290
-252
No files matched your search
@@ -387,17 +387,17 @@ extension UniqueArray where Element: ~Copyable {
|
||||
@inlinable
|
||||
@_lifetime(borrow self)
|
||||
public func nextSpan(
|
||||
after index: inout Int, maxCount: Int
|
||||
after index: inout Int
|
||||
) -> Span<Element> {
|
||||
_storage.nextSpan(after: &index, maxCount: maxCount)
|
||||
_storage.nextSpan(after: &index)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(borrow self)
|
||||
public func nextSpan(
|
||||
after index: inout Int, limitedBy limit: Int?
|
||||
after index: inout Int, maxCount: Int, limitedBy limit: Int
|
||||
) -> Span<Element> {
|
||||
_storage.nextSpan(after: &index, limitedBy: limit)
|
||||
_storage.nextSpan(after: &index, maxCount: maxCount, limitedBy: limit)
|
||||
}
|
||||
|
||||
@inlinable
|
||||
|
||||
Reference in new issue
Block a user