luaur-common 0.1.3

Foundational data structures and flags for the luaur Luau-in-Rust toolchain.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::records::pair_hash::PairHash;

// Method `call` already defined on PairHash in the record file.
// This operator() method is fully provided by the record's inherent impl.
pub fn _pair_hash_operator_call_body<T1, T2, H1, H2>(h1: &H1, h2: &H2, p: &(T1, T2)) -> usize
where
    H1: Fn(&T1) -> usize,
    H2: Fn(&T2) -> usize,
{
    let mut seed: usize = 0;
    crate::functions::hash_combine::hash_combine(&mut seed, h1(&p.0));
    crate::functions::hash_combine::hash_combine(&mut seed, h2(&p.1));
    seed
}