Skip to content

Commit

Permalink
Make SlotId::new public
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0246 committed Oct 18, 2024
1 parent b4af5b5 commit db6810a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,8 @@ impl SlotId {
generation: NonZeroU32::MAX,
};

#[cfg(test)]
const fn new(index: u32, generation: u32) -> Self {
#[inline(always)]
pub const fn new(index: u32, generation: u32) -> Self {
assert!(generation & OCCUPIED_BIT != 0);

// SAFETY: We checked that the `OCCUPIED_BIT` is set.
Expand Down

0 comments on commit db6810a

Please sign in to comment.