This release prepares for source stability by deprecating some OrderedDictionary APIs that we'd like to remove in version 1.0 of the package. (All deprecated names have reasonable replacements.)
Changes
-
The two
OrderedDictionary.modifyValue
methods were renamedupdateValue
, to better align with the standardupdateValue
function (#90)/* Old: */ d.modifyValue(forKey: key, default: []) { $0.append(newValue) } /* New: */ d.updateValue(forKey: key, default: []) { $0.append(newValue) } /* Old: */ d.modifyValue(forKey: key, insertingDefault: [], at: 0) { $0.append(newValue) } /* New: */ d.updateValue(forKey: key, insertingDefault: [], at: 0) { $0.append(newValue) }
-
OrderedDictionary.subscript(offset:)
was removed; it used inconsistent terminology. To access a key-value pair at a given position, you can continue using the unlabeled subscript on theelements
view./* Deprecated: */ d[offset: 42] /* Replacement: */ d.element[42]
-
The collections benchmarks were moved to a standalone nested package in a subdirectory of the repository, allowing the top-level package manifest to stop declaring a dependency on swift-collections-benchmark. This will make it easier to add Swift Collections as a dependency, especially in projects such as the Package Manager (or the benchmarking tool itself).
The old names for removed/renamed APIs are still available as deprecated members -- these will be removed in the 1.0 release.
Pull requests
- #81 Fix typos: missing subscript parameters (by @ejmarchant)
- #82 Fix documentation for types conforming to ExpressibleByArrayLiteral or ExpressibleByDictionaryLiteral (by @ejmarchant)
- #86 Stop depending on swift-collections-benchmark (by @lorentey)
- #91 [OrderedDictionary] modifyValue → updateValue (by @lorentey)
- #93 Add Benchmarks package to workspace (by @lorentey)
- #92 [OrderedDictionary] Deprecate
subscript(offset:)
for now (by @lorentey)
Thank you to everyone who contributed to this release! Your bug reports, discussions and pull requests all help improve this package.