Skip to content

Commit

Permalink
Resolve clippy warning in tear-off (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Jul 6, 2023
1 parent a8ee48a commit a60058c
Showing 1 changed file with 2 additions and 5 deletions.
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

0 comments on commit a60058c

Please sign in to comment.