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 0590552 commit f2abb35Copy full SHA for f2abb35
stdlib/public/core/ArrayBufferProtocol.swift
@@ -164,9 +164,9 @@ extension _ArrayBufferProtocol {
164
let holeStart = elements + subrange.lowerBound
165
let holeEnd = holeStart + newCount
166
167
- if eraseCount > 0 {
168
- holeStart.deinitialize(count: eraseCount)
169
- }
+ // directly forwards to Builtin.destroyArray
+ // TODO: should we branch here or does the compiler branch implicitly?
+ holeStart.deinitialize(count: eraseCount)
170
171
// resize the hole to make it the correct size
172
// safe to always call, moveInitialize to the same location is a no-op
0 commit comments