mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-22 19:20:43 +00:00
The current `compute_previous_power_of_two()` implementation used for TermHashmap takes and returns `usize` , but actually only works correclty on 64 bit architectures (aka usize == u64) On other architectures the leading_zeros computation is run on the wrong type (must be u64), and leads to overflows. Fixed simply computing the leading_zeros based on a u64 value.