core/hash_table: const fn Settings::chain_entry_size
This commit is contained in:
parent
b2f4ec452e
commit
7d61a9b7fc
|
@ -40,8 +40,11 @@ pub struct Value<R> {
|
|||
|
||||
impl Settings {
|
||||
#[inline]
|
||||
pub fn chain_entry_size(&self) -> usize {
|
||||
(1 + usize::from(self.entsize)).checked_mul(16).unwrap()
|
||||
pub const fn chain_entry_size(&self) -> usize {
|
||||
match (1 + self.entsize as usize).checked_mul(16) {
|
||||
Some(x) => x,
|
||||
None => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue