mirror of
https://github.com/apple/swift-collections
synced 2026-11-24 04:27:53 +00:00
RigidArray, UniqueArray: Move remaining deprecations to dedicated file
This commit is contained in:
4 files changed
+74
-75
No files matched your search
@@ -274,6 +274,29 @@ extension UniqueArray where Element: ~Copyable {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueArray {
|
||||
/// Copy the contents of this array into a newly allocated unique array
|
||||
/// instance with just enough capacity to hold all its elements.
|
||||
///
|
||||
/// - Complexity: O(`count`)
|
||||
@available(*, deprecated, renamed: "clone()")
|
||||
@inlinable
|
||||
public func copy() -> Self {
|
||||
self.clone()
|
||||
}
|
||||
|
||||
/// Copy the contents of this array into a newly allocated unique array
|
||||
/// instance with the specified capacity.
|
||||
///
|
||||
/// - Parameter capacity: The desired capacity of the resulting unique array.
|
||||
/// `capacity` must be greater than or equal to `count`.
|
||||
///
|
||||
/// - Complexity: O(`count`)
|
||||
@available(*, deprecated, renamed: "clone(capacity:)")
|
||||
@inlinable
|
||||
public func copy(capacity: Int) -> Self {
|
||||
clone(capacity: capacity)
|
||||
}
|
||||
|
||||
/// Replaces the specified subrange of elements by copying the elements of
|
||||
/// the given buffer pointer, which must be fully initialized.
|
||||
///
|
||||
|
||||
@@ -302,31 +302,5 @@ extension UniqueArray {
|
||||
public func clone(capacity: Int) -> Self {
|
||||
UniqueArray(consuming: _storage.clone(capacity: capacity))
|
||||
}
|
||||
|
||||
/// Copy the contents of this array into a newly allocated unique array
|
||||
/// instance with just enough capacity to hold all its elements.
|
||||
///
|
||||
/// - Complexity: O(`count`)
|
||||
@available(*, deprecated, renamed: "clone()")
|
||||
@inlinable
|
||||
public func copy() -> Self {
|
||||
self.clone()
|
||||
}
|
||||
|
||||
/// Copy the contents of this array into a newly allocated unique array
|
||||
/// instance with the specified capacity.
|
||||
///
|
||||
/// - Parameter capacity: The desired capacity of the resulting unique array.
|
||||
/// `capacity` must be greater than or equal to `count`.
|
||||
///
|
||||
/// - Complexity: O(`count`)
|
||||
@available(*, deprecated, renamed: "clone(capacity:)")
|
||||
@inlinable
|
||||
public func copy(capacity: Int) -> Self {
|
||||
clone(capacity: capacity)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user