From 4ae3c68dfd6e6f6c2aadb924d0e4ff4cf2a3a820 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Mon, 9 Dec 2024 10:11:48 -0600 Subject: [PATCH] more tests --- crates/tests/bindgen/src/class_with_handler.rs | 4 ++-- crates/tests/bindgen/src/delegate.rs | 4 ++-- crates/tests/bindgen/src/delegate_generic.rs | 4 ++-- crates/tests/misc/component/src/bindings.rs | 4 ++-- crates/tests/misc/component_client/src/bindings.rs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/crates/tests/bindgen/src/class_with_handler.rs b/crates/tests/bindgen/src/class_with_handler.rs index be4a5fd550..a005dcabac 100644 --- a/crates/tests/bindgen/src/class_with_handler.rs +++ b/crates/tests/bindgen/src/class_with_handler.rs @@ -81,7 +81,7 @@ impl DeferralCompletedHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -143,7 +143,7 @@ impl windows_core::Result<()> + Send + 'static> DeferralCompletedH let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/bindgen/src/delegate.rs b/crates/tests/bindgen/src/delegate.rs index f0de083cd8..0a0411d22c 100644 --- a/crates/tests/bindgen/src/delegate.rs +++ b/crates/tests/bindgen/src/delegate.rs @@ -22,7 +22,7 @@ impl DeferralCompletedHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self) -> windows_core::Result<()> { let this = self; @@ -84,7 +84,7 @@ impl windows_core::Result<()> + Send + 'static> DeferralCompletedH let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/bindgen/src/delegate_generic.rs b/crates/tests/bindgen/src/delegate_generic.rs index a7d1fb4ebe..0b64d43f2f 100644 --- a/crates/tests/bindgen/src/delegate_generic.rs +++ b/crates/tests/bindgen/src/delegate_generic.rs @@ -39,7 +39,7 @@ impl EventHandler { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, sender: P0, args: P1) -> windows_core::Result<()> where @@ -137,7 +137,7 @@ impl< let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/misc/component/src/bindings.rs b/crates/tests/misc/component/src/bindings.rs index 258bc8916e..bc3b8e3138 100644 --- a/crates/tests/misc/component/src/bindings.rs +++ b/crates/tests/misc/component/src/bindings.rs @@ -22,7 +22,7 @@ impl Callback { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, a: i32) -> windows_core::Result { let this = self; @@ -93,7 +93,7 @@ impl windows_core::Result + Send + 'static> CallbackBox let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining } diff --git a/crates/tests/misc/component_client/src/bindings.rs b/crates/tests/misc/component_client/src/bindings.rs index eb8dd0cd8a..d35d841615 100644 --- a/crates/tests/misc/component_client/src/bindings.rs +++ b/crates/tests/misc/component_client/src/bindings.rs @@ -22,7 +22,7 @@ impl Callback { count: windows_core::imp::RefCount::new(1), invoke, }; - unsafe { core::mem::transmute(Box::new(com)) } + unsafe { core::mem::transmute(windows_core::imp::Box::new(com)) } } pub fn Invoke(&self, a: i32) -> windows_core::Result { let this = self; @@ -93,7 +93,7 @@ impl windows_core::Result + Send + 'static> CallbackBox let this = this as *mut *mut core::ffi::c_void as *mut Self; let remaining = (*this).count.release(); if remaining == 0 { - let _ = Box::from_raw(this); + let _ = windows_core::imp::Box::from_raw(this); } remaining }