JesperAxelsson / rust-intmap

Specialized hashmap for u64 keys
MIT License
30 stars 10 forks source link

Method `append`? #18

Closed ice1000 closed 4 years ago

ice1000 commented 4 years ago

I believe there should be an append method that joins two intmaps.

JesperAxelsson commented 4 years ago

Thank you for the report. IntMap implements iterator . Can't you use Extend perhaps?

ice1000 commented 4 years ago

Looks good, but can I collect an iterator as an IntMap?

JesperAxelsson commented 4 years ago

I think so yes. Collect part of the iterator trait. If you run into issues please let me know and I can fix it.

ice1000 commented 4 years ago

Ok. Seems it works well. Thanks!

JesperAxelsson commented 4 years ago

I implemented the extend trait properly now, should make it easier to append two IntMaps.

ice1000 commented 4 years ago

Cool