Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions crates/libs/core/src/imp/weak_ref_count.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// TODO: workaround for https://github.com/rust-lang/rust-clippy/issues/11113
#![allow(clippy::unnecessary_cast)]

use super::*;
use crate::ComInterface;
use std::sync::atomic::{AtomicIsize, Ordering};
Expand Down Expand Up @@ -123,7 +120,7 @@ impl TearOff {
}

unsafe fn query_interface(&self, iid: &crate::GUID, interface: *mut *const std::ffi::c_void) -> crate::HRESULT {
((*(*(self.object as *mut *mut _) as *mut crate::IUnknown_Vtbl)).QueryInterface)(self.object, iid, interface)
((*(*(self.object as *mut *mut crate::IUnknown_Vtbl))).QueryInterface)(self.object, iid, interface)
}

unsafe extern "system" fn StrongQueryInterface(ptr: *mut std::ffi::c_void, iid: &crate::GUID, interface: *mut *const std::ffi::c_void) -> crate::HRESULT {
Expand Down Expand Up @@ -180,7 +177,7 @@ impl TearOff {

// Forward strong `Release` to the object so that it can destroy itself. It will then
// decrement its weak reference and allow the tear-off to be released as needed.
((*(*(this.object as *mut *mut _) as *mut crate::IUnknown_Vtbl)).Release)(this.object)
((*(*(this.object as *mut *mut crate::IUnknown_Vtbl))).Release)(this.object)
}

unsafe extern "system" fn WeakRelease(ptr: *mut std::ffi::c_void) -> u32 {
Expand Down