We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
removeLast(_: Int)
1 parent 9b4e430 commit 61fae31Copy full SHA for 61fae31
proposals/nnnn-outputspan.md
@@ -187,9 +187,14 @@ extension OutputSpan {
187
}
188
```
189
190
-A bulk operation to deinitialize all of an `OutputSpan`'s memory is also available:
+Bulk operations to deinitialize some or all of an `OutputSpan`'s memory is also available:
191
```swift
192
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
+
198
/// Remove all this span's elements and return its memory to the uninitialized state.
199
@lifetime(self: copy self)
200
public mutating func removeAll()
0 commit comments