diff --git a/agb/src/hash_map.rs b/agb/src/hash_map.rs index f055a0ed..3ea08233 100644 --- a/agb/src/hash_map.rs +++ b/agb/src/hash_map.rs @@ -59,7 +59,7 @@ impl HashMap { } } -fn fast_mod(len: usize, hash: HashType) -> usize { +const fn fast_mod(len: usize, hash: HashType) -> usize { debug_assert!(len.is_power_of_two(), "Length must be a power of 2"); (hash as usize) & (len - 1) }