Files
swift-collections/Sources/ContainersPreview
e7d8cd2203 [ContainersPreview] Fix append(copying:) recursion and wrapped insert(copying:at:) (#819)
* [ContainersPreview] Fix append(copying:) recursion and wrapped insert(copying:at:)

The RangeReplaceableContainer extension's append(copying:) passed a
contiguous source's buffer back to itself and never returned.
_insertCollection copied the whole buffer on every initializer call, which
trapped when a deque's gap wrapped around the end of its storage. Copy only
what fits on each call, as replaceSubrange(_:copying:) already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Delete Tests/DequeTests/RangeReplaceableContainerCopyingTests.swift

Let's drop the tests for now; we'll need a less involved way to exercise such algorithms.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Karoy Lorentey <klorentey@apple.com>
2026-11-03 14:57:43 -08:00
..