1 unstable release
| 0.0.0 | Feb 13, 2021 |
|---|
#80 in #hash-set
256 downloads per month
Used in 4 crates
(2 directly)
13KB
272 lines
This library provides HashMap and HashSet replacements that implement the Hash
trait -- HashableHashMap and HashableHashSet.
Example
The following is rejected by the compiler:
let mut inner_set = std::collections::HashSet::new();
inner_set.insert("inner value");
let mut outer_set = std::collections::HashSet::new();
outer_set.insert(inner_set);
error[E0277]: the trait bound `HashSet<&str>: Hash` is not satisfied
The error can be resolved by swapping the inner HashSet with HashableHashSet:
let mut inner_set = hashable::HashableHashSet::new();
inner_set.insert("inner value");
let mut outer_set = std::collections::HashSet::new();
outer_set.insert(inner_set);
This Rust library provides HashMap and HashSet replacements that implement
the Hash trait -- HashableHashMap and HashableHashSet.
Contribution
Contributions are welcome! Please fork the library, push changes to your fork, and send a pull request. All contributions are shared under an MIT license unless explicitly stated otherwise in the pull request.
License
Hashable is copyright 2021 Jonathan Nadal. It is made available under the MIT License.
Dependencies
~310–680KB
~14K SLoC