Skip to main content

luaur_bytecode/methods/
bytecode_builder_string_ref_hash_operator_call.rs

1use crate::records::string_ref::StringRef;
2use crate::records::string_ref_hash::StringRefHash;
3use luaur_common::functions::hash_range::hashRange;
4
5impl StringRefHash {
6    #[allow(non_snake_case)]
7    pub fn operator_call(&self, v: &StringRef) -> usize {
8        unsafe { hashRange(v.data, v.length) }
9    }
10}