replace transmut with pointer cast calls

This commit is contained in:
Bennet Bleßmann
2024-07-06 01:38:13 +02:00
parent b8a3067744
commit 3de0a4e2ad

View File

@@ -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<Self> {
unsafe { TypedArenaPtr::new(std::mem::transmute::<_, *mut IndexPtr>(ptr.get_ptr())) }
unsafe { TypedArenaPtr::new(ptr.get_ptr().cast_mut().cast::<IndexPtr>()) }
}
#[inline]