]> Repositorios git - scryer-prolog.git/commitdiff
replace transmut with pointer cast calls
authorBennet Bleßmann <[email protected]>
Fri, 5 Jul 2024 23:38:13 +0000 (01:38 +0200)
committerBennet Bleßmann <[email protected]>
Fri, 5 Jul 2024 23:38:13 +0000 (01:38 +0200)
src/arena.rs

index b65dec71175e657430a0dbbc30ef1300cc84d4b3..b9f2ae78005af31f426dd8e0f9440b586fbe011d 100644 (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]