From 3de0a4e2adc000da04a923439a05381c18f9f030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 6 Jul 2024 01:38:13 +0200 Subject: [PATCH] replace transmut with pointer cast calls --- src/arena.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arena.rs b/src/arena.rs index b65dec71..b9f2ae78 100644 --- a/src/arena.rs +++ b/src/arena.rs @@ -566,7 +566,7 @@ impl ArenaAllocated for IndexPtr { /// # Safety /// - the caller must guarantee that the pointee type of UntypedArenaPtr is T unsafe fn typed_ptr(ptr: UntypedArenaPtr) -> TypedArenaPtr { - unsafe { TypedArenaPtr::new(std::mem::transmute::<_, *mut IndexPtr>(ptr.get_ptr())) } + unsafe { TypedArenaPtr::new(ptr.get_ptr().cast_mut().cast::()) } } #[inline] -- 2.54.0