HashSet operations against another HashSet should allow for differing hash algorithms
82d887a
Opened by Jake Goulding at
Operations such as intersection take a second HashMap. It's required that the second HashMap implement the same hashing algorithm as the first one:
impl<T, S> HashSet<T, S>
where T: Eq + Hash,
S: HashState
{
fn intersection<'a>(&'a self, other: &'a HashSet<T, S>) -> Intersection<'a, T, S>;
}
This means that you cannot intersect a HashMap<u8, SipHash> against a HashMap<u8, FnvHash>. This seems overly restrictive.
/cc @bluss
With FnvHash it doesn't need to recompute hashes either. But we should not stall on that, this change is more likely to introduce type inference regressions the longer custom hasher support is stable.
bluss at 2016-02-16 18:45:45
Triage: not aware of any changes here
Steve Klabnik at 2019-12-25 17:08:15