Skip to content

Commit 61fae31

Browse files
committed
Add removeLast(_: Int)
1 parent 9b4e430 commit 61fae31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

proposals/nnnn-outputspan.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,14 @@ extension OutputSpan {
187187
}
188188
```
189189

190-
A bulk operation to deinitialize all of an `OutputSpan`'s memory is also available:
190+
Bulk operations to deinitialize some or all of an `OutputSpan`'s memory is also available:
191191
```swift
192192
extension OutputSpan where Element: ~Copyable {
193+
/// Remove the last N elements, returning the memory they occupy
194+
/// to the uninitialized state.
195+
@lifetime(self: copy self)
196+
public mutating func removeLast(_ n: Int)
197+
193198
/// Remove all this span's elements and return its memory to the uninitialized state.
194199
@lifetime(self: copy self)
195200
public mutating func removeAll()

0 commit comments

Comments
 (0)