luaur_common/methods/pair_hash_operator_call.rs
1use crate::records::pair_hash::PairHash;
2
3// Method `call` already defined on PairHash in the record file.
4// This operator() method is fully provided by the record's inherent impl.
5pub fn _pair_hash_operator_call_body<T1, T2, H1, H2>(h1: &H1, h2: &H2, p: &(T1, T2)) -> usize
6where
7 H1: Fn(&T1) -> usize,
8 H2: Fn(&T2) -> usize,
9{
10 let mut seed: usize = 0;
11 crate::functions::hash_combine::hash_combine(&mut seed, h1(&p.0));
12 crate::functions::hash_combine::hash_combine(&mut seed, h2(&p.1));
13 seed
14}