Skip to content

Commit 84c3a12

Browse files
add public storage computed property to VLArray
1 parent e6414d8 commit 84c3a12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/VariableLengthArray/VLArray.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ public struct VLArray<Element>: ~Copyable, @unchecked Sendable where Element: ~C
1313
public init(_storage: UnsafeMutableBufferPointer<Element>) {
1414
self._storage = _storage
1515
}
16+
17+
@inlinable
18+
public var storage: UnsafeMutableBufferPointer<Element> {
19+
_read { yield _storage }
20+
}
1621
}
1722

1823
extension VLArray where Element: ~Copyable {

0 commit comments

Comments
 (0)