From f455452a34857079c109d6fc36780d7820164268 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Fri, 4 Dec 2020 11:22:58 +0000 Subject: [PATCH] 'mem::forget' is a more idiomatic way of not dropping something. --- ykrt/src/mt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ykrt/src/mt.rs b/ykrt/src/mt.rs index 7e09fb30f..e7db51c76 100644 --- a/ykrt/src/mt.rs +++ b/ykrt/src/mt.rs @@ -299,7 +299,7 @@ impl MTThread { let bct = unsafe { Box::from_raw(ptr as *mut CompiledTrace) }; let tptr = bct.ptr(); let func: fn(&mut I) -> bool = unsafe { mem::transmute(tptr) }; - let _raw = Box::into_raw(bct); + mem::forget(bct); return Some(func); } _ => unreachable!(),