mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
insert(addingCount:initializingWith:) batches elements through a temporary OutputSpan and loops while `remainder > 0`. When the `UnstableContainersPreview` trait is disabled, the span's `defer` handler moved elements out of the temporary buffer but never decremented `remainder`, so the loop spun forever whenever the initializer didn't fill every batch. Update `remainder` the same way the preview branch already does, and add a regression test (issue #774).
Unit tests
Beware! The contents of this directory are not source stable. They are provided as is, with no compatibility promises across package releases. Future versions of this package can arbitrarily change these files or remove them, without any advance notice. (This can include patch releases.)