Skip to content

Commit d019d26

Browse files
committed
Rebase on top of the main branch.
1 parent 0020171 commit d019d26

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/external_trait_impls/paralight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ mod test {
592592

593593
impl<T: Copy + Hash> Hash for HashCell<T> {
594594
fn hash<H: Hasher>(&self, state: &mut H) {
595-
self.0.get().hash(state)
595+
self.0.get().hash(state);
596596
}
597597
}
598598

src/raw.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,12 +1482,10 @@ impl<T, A: Allocator> RawTable<T, A> {
14821482
return;
14831483
}
14841484

1485-
// Avoid `Option::unwrap_or_else` because it bloats LLVM IR.
1486-
let (layout, ctrl_offset) =
1487-
match Self::TABLE_LAYOUT.calculate_layout_for(self.table.num_buckets()) {
1488-
Some(lco) => lco,
1489-
None => unsafe { hint::unreachable_unchecked() },
1490-
};
1485+
let (layout, ctrl_offset) = {
1486+
let option = Self::TABLE_LAYOUT.calculate_layout_for(self.table.num_buckets());
1487+
unsafe { option.unwrap_unchecked() }
1488+
};
14911489
let ptr =
14921490
unsafe { NonNull::new_unchecked(self.table.ctrl.as_ptr().sub(ctrl_offset).cast()) };
14931491
unsafe {

0 commit comments

Comments
 (0)