aboutsummaryrefslogtreecommitdiff
path: root/azalea-block/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-25 17:37:29 -0500
committermat <github@matdoes.dev>2022-06-25 17:37:29 -0500
commite8deda5d2e45eb634700614009cbcc5b35949e26 (patch)
treedab321d33c66e20e8b558d9777550a3d27cd4b59 /azalea-block/src
parent978880b756aa052226f77c21e8e9de9b40070152 (diff)
downloadazalea-drasl-e8deda5d2e45eb634700614009cbcc5b35949e26.tar.xz
clippo
Diffstat (limited to 'azalea-block/src')
-rw-r--r--azalea-block/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
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::<u32, BlockState>(state_id)