github apple/swift-collections 1.6.0
Swift Collections 1.6.0

7 hours ago

This is a feature release adding several useful operations to ordered collections, as well as shipping bug fixes that landed since 1.5.1.

The list of supported Swift toolchain versions remains 6.0, 6.1, 6.2, and 6.3 for now. Note that we intend to retire support for Swift 6.0 and 6.1 in a subsequent release later this year.

New OrderedCollections operations

We now have several new operations that move existing elements in an OrderedSet or OrderedDictionary to a new position within the same collection:

  • OrderedSet.moveSubrange(_:to:) and OrderedDictionary.moveSubrange(_:to:) move items at a range of indices to just before the item at the specified destination index.
  • OrderedSet.move(members:to:) and OrderedDictionary.move(keys:to:) relocate elements identified by value (or key), preserving the order in which they're listed.
  • OrderedSet.move(indices:to:) and OrderedDictionary.move(indices:to:) relocate items at an arbitrary sequence of indices, preserving their listed order.

Bugfixes

  • SortedCollections [with the UnstableSortedCollections trait]: The default capacity of B-tree nodes is no longer clamped at 16, improving performance. (#257)
  • DequeModule: The ownership-aware RigidDeque and UniqueDeque types no longer hand out invalid spans to clients (#659)
  • ContainersPreview [with the UnstableContainersPreview trait]: The deprecated Borrow type alias is now declared with correct availability. (#655)

What's Changed

New Contributors

Full Changelog: 1.5.1...1.6.0

Don't miss a new swift-collections release

NewReleases is sending notifications on new releases.