From 9d30f0f1b8388c13c768f962e616d5292a506930 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 4 Nov 2024 01:49:19 -0500 Subject: Fix rust object destructors taking a ref accidentally --- rust/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src') diff --git a/rust/src/lib.rs b/rust/src/lib.rs index e6323c07..a0667eb0 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -624,7 +624,7 @@ pub trait ObjectDestructor: 'static + Sync + Sized { { ffi_wrap!("ObjectDestructor::destruct_view", { let view_type = &*(ctxt as *mut Self); - let view = BinaryView::from_raw(view); + let view = BinaryView { handle: view }; view_type.destruct_view(&view); }) } @@ -642,7 +642,7 @@ pub trait ObjectDestructor: 'static + Sync + Sized { { ffi_wrap!("ObjectDestructor::destruct_function", { let view_type = &*(ctxt as *mut Self); - let func = Function::from_raw(func); + let func = Function { handle: func }; view_type.destruct_function(&func); }) } -- cgit v1.3.1