capacity_to_buckets

Function capacity_to_buckets 

Source
fn capacity_to_buckets(cap: usize, table_layout: TableLayout) -> Option<usize>
Expand description

Returns the number of buckets needed to hold the given number of items, taking the maximum load factor into account.

Returns None if an overflow occurs.

This ensures that buckets * table_layout.size >= table_layout.ctrl_align.