RigidArray, UniqueArray: Deprecate ancient span methods

This commit is contained in:
Karoy Lorentey committed 2026-10-21 19:39:43 -07:00
1 parent da4ca36d4a
commit 1522a8a85d
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)
}
}