robclu / leapfrog

Lock-free concurrent and single-threaded hash map implementations using Leapfrog probing. Currently the highest performance concurrent HashMap in Rust for certain use cases.
Apache License 2.0
202 stars 9 forks source link

Clone #5

Closed brurucy closed 1 year ago

brurucy commented 1 year ago

Is there a specific reason as to why the single-threaded hash map does not implement Clone nor Default?

robclu commented 1 year ago

Hi,

No there isn't, other than that for Clone the use case has never came up, and there is new, which should actually have been Default originally. I've added both implementations and tested clone works. If you run into any problems please create an issue.

robclu commented 1 year ago

I've updated the version on published crate to 0.2.2.

brurucy commented 1 year ago

I noticed that it cannot be used with stable, thanks anyways!