From db6810ab699b99fd79052252c057851fa80117cf Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:30:48 +0200 Subject: [PATCH] Make `SlotId::new` public --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9ada78d..0cb486f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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.