pointfreeco / swift-identified-collections

A library of data structures for working with collections of identifiable elements in an ergonomic, performant way.
MIT License
531 stars 45 forks source link

Fix subscript set operation #70

Closed stephencelis closed 4 months ago

stephencelis commented 4 months ago

PR #66 fixed one issue but introduced a regression. This PR changes the subscript setter to do a swap when identity of elements match something that already exists in the collection.

I've also stubbed out a fake property testing suite that can hopefully be expanded with more operations soon.

Fixes #69.