From e7b124ac9fc9382f04fde22628fe576f1da58078 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Fri, 13 Dec 2024 15:10:31 -0600 Subject: [PATCH] merge --- crates/libs/core/src/ref.rs | 2 +- crates/libs/core/src/type.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/libs/core/src/ref.rs b/crates/libs/core/src/ref.rs index 62ea88c141..537df22d02 100644 --- a/crates/libs/core/src/ref.rs +++ b/crates/libs/core/src/ref.rs @@ -43,7 +43,7 @@ impl> Ref<'_, T> { } unsafe fn assume_init_ref(&self) -> &T { - T::assume_init_ref(&self.0) + unsafe { T::assume_init_ref(&self.0) } } } diff --git a/crates/libs/core/src/type.rs b/crates/libs/core/src/type.rs index 0b192fccb4..a64f191d0a 100644 --- a/crates/libs/core/src/type.rs +++ b/crates/libs/core/src/type.rs @@ -37,7 +37,7 @@ where } unsafe fn assume_init_ref(abi: &Self::Abi) -> &Self { - core::mem::transmute::<&*mut core::ffi::c_void, &T>(abi) + unsafe { core::mem::transmute::<&*mut core::ffi::c_void, &T>(abi) } } unsafe fn from_abi(abi: Self::Abi) -> Result { @@ -67,7 +67,7 @@ where } unsafe fn assume_init_ref(abi: &Self::Abi) -> &Self { - abi.assume_init_ref() + unsafe { abi.assume_init_ref() } } unsafe fn from_abi(abi: Self::Abi) -> Result {