diff --git a/src/util.rs b/src/util.rs index 6d4f7d3..1133c7e 100644 --- a/src/util.rs +++ b/src/util.rs @@ -127,7 +127,7 @@ pub(crate) const fn cast_ptr(n: &T) -> *const T { /// /// This is a workaround for the lack of panic-in-const in older /// toolchains. -#[allow(unconditional_panic)] +#[allow(unconditional_panic, clippy::out_of_bounds_indexing)] pub(crate) const fn unwrap_u32(t: Option) -> u32 { match t { Some(v) => v, @@ -139,7 +139,7 @@ pub(crate) const fn unwrap_u32(t: Option) -> u32 { /// /// This is a workaround for the lack of panic-in-const in older /// toolchains. -#[allow(unconditional_panic)] +#[allow(unconditional_panic, clippy::out_of_bounds_indexing)] pub(crate) const fn unwrap_nonzero(t: Option) -> NonZeroU32 { match t { Some(v) => v,