Closed laher closed 1 year ago
@laher Sorry for the late reply. AFAICT this looks ok. @anacrolix what do you think?
Give me a few days to try it out.
I've been using this for a while without issues. :+1:
Thanks @laher. I went ahead and merged. If anyone has any objections or changes, go ahead and open a new PR. 👍
This did solve the issue, I used it in https://github.com/anacrolix/stm/commit/32174bfc2d877d4b3df131c9e2c7704a82755443 and https://github.com/anacrolix/dht/commit/88ee3382ad4a18a10bfc28476136a97ee094bfd8.
Nice one. I just noticed that I didn't update the readme. I can PR it a bit later, and then maybe we need another release?
I went ahead and cut a v0.4.1 release: https://github.com/benbjohnson/immutable/releases/tag/v0.4.1
Addressing https://github.com/benbjohnson/immutable/issues/25 (second attempt)
As suggested by @anacrolix after my previous attempt (https://github.com/benbjohnson/immutable/pull/26):
So I used
comparable
, but under the hood it only supports strings, the various integer types, and derived types.As before, the defaultComparer panics if you try to use any other key type. You just need to write your own Comparer for other types.