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.
1 parent 42337d3 commit 4764913Copy full SHA for 4764913
stdlib/public/core/Span/OutputSpan.swift
@@ -315,6 +315,7 @@ extension OutputSpan where Element: ~Copyable {
315
@_alwaysEmitIntoClient
316
@lifetime(self: copy self)
317
public mutating func removeAll() {
318
+ guard count > 0 else { return }
319
_ = unsafe _start().withMemoryRebound(to: Element.self, capacity: _count) {
320
unsafe $0.deinitialize(count: _count)
321
}
0 commit comments