From e8deda5d2e45eb634700614009cbcc5b35949e26 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 25 Jun 2022 17:37:29 -0500 Subject: clippo --- azalea-block/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'azalea-block/src/lib.rs') diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index a6de1e92..f07b1bce 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -7,8 +7,10 @@ pub use blocks::*; use std::mem; impl BlockState { - /// Transmutes a u32 to a block state. UB if the value is not a valid block - /// state. + /// Transmutes a u32 to a block state. + /// + /// # Safety + /// The `state_id` should be a valid block state. #[inline] pub unsafe fn from_u32_unsafe(state_id: u32) -> Self { mem::transmute::(state_id) -- cgit v1.2.3