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 f593d75 commit 5e9c3f4Copy full SHA for 5e9c3f4
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