mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
RigidArray, UniqueArray: Deprecate ancient span methods
This commit is contained in:
6 files changed
+153
-174
No files matched your search
@@ -346,6 +346,14 @@ extension UniqueArray where Element: ~Copyable {
|
||||
_storage.nextSpan(after: &index, maxCount: maxCount, limitedBy: limit)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(&self)
|
||||
public mutating func nextMutableSpan(
|
||||
after index: inout Int
|
||||
) -> MutableSpan<Element> {
|
||||
_storage.nextMutableSpan(after: &index)
|
||||
}
|
||||
|
||||
@inlinable
|
||||
@_lifetime(&self)
|
||||
public mutating func nextMutableSpan(
|
||||
@@ -369,6 +377,15 @@ extension UniqueArray where Element: ~Copyable {
|
||||
before: index, maxDistance: maxDistance, limitedBy: limit)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(borrow self)
|
||||
public func previousSpan(
|
||||
before index: inout Int
|
||||
) -> Span<Element> {
|
||||
// FIXME: Remove this in favor of the BidirectionalContainer algorithm.
|
||||
_storage.previousSpan(before: &index)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(borrow self)
|
||||
public func previousSpan(
|
||||
@@ -377,4 +394,12 @@ extension UniqueArray where Element: ~Copyable {
|
||||
// FIXME: Remove this in favor of the BidirectionalContainer algorithm.
|
||||
_storage.previousSpan(before: &index, maxCount: maxCount)
|
||||
}
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(&self)
|
||||
public mutating func previousMutableSpan(
|
||||
before index: inout Int
|
||||
) -> MutableSpan<Element> {
|
||||
_storage.previousMutableSpan(before: &index)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user