mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
[Future] RigidArray, DynamicArray: Add span properties
This commit is contained in:
2 files changed
+12
No files matched your search
@@ -28,6 +28,12 @@ extension DynamicArray where Element: ~Copyable {
|
||||
public var capacity: Int { _storage.capacity }
|
||||
}
|
||||
|
||||
extension DynamicArray where Element: ~Copyable {
|
||||
public var span: Span<Element> {
|
||||
_storage.span
|
||||
}
|
||||
}
|
||||
|
||||
extension DynamicArray: RandomAccessContainer where Element: ~Copyable {
|
||||
public typealias BorrowingIterator = RigidArray<Element>.BorrowingIterator
|
||||
public typealias Index = Int
|
||||
|
||||
Reference in new issue
Block a user