ogxd / gxhash

The fastest hashing algorithm 📈
https://docs.rs/gxhash
MIT License
767 stars 26 forks source link

Missing `std` compatibility traits on `GxHasher` and `GxBuildHasher` #28

Closed virtualritz closed 10 months ago

virtualritz commented 10 months ago

I often use AHashMap as a drop in for HashMap in my code. Switching to GxHashMap in one of my projects, I get this:

error[E0277]: the trait bound `GxBuildHasher: Clone` is not satisfied
  --> src/app.rs:60:26
   |
59 | #[derive(Clone, Debug, Default)]
   |          ----- in this derive macro expansion
60 | struct UnicodeCollection(HashSet<char>);
   |                          ^^^^^^^^^^^^^ the trait `Clone` is not implemented for `GxBuildHasher`
   |
   = note: required for `HashSet<char, GxBuildHasher>` to implement `Clone`

Here is a PR that, among other stuff, fixes this..

ogxd commented 10 months ago

Released as 2.2.4