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