-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Right now we use the standard library hash map Hasher in the Count
trait: https://github.com/github/rust-gems/blob/main/crates/geo_filters/src/lib.rs#L56-L61
There's a TODO to use a stable hash function, meaning one that doesn't change as different versions of Rust are released. This is important because if two machines are e.g. comparing geofilters then a different hash function would result in meaningless output.
This proposed change allows the user of the library to specify what hash function they would like to use. This allows them to specify the hash function they want to use on both sides, ensuring the hash values for the same are consistent. It also has a side benefit of making the library more flexible if better hash functions become available.