Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlie Davis committed May 15, 2024
1 parent 6981799 commit 9f7a58b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/libs/core/src/com_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::borrow::Borrow;
///
/// This trait is an implementation detail of the Windows crates.
/// User code should not deal directly with this trait.
pub unsafe trait ComImpl {
pub trait ComImpl {
/// The generated `<foo>_Impl` type (aka the "boxed" type or "outer" type).
type Outer: IUnknownImpl<Impl = Self>;
}
Expand Down
3 changes: 1 addition & 2 deletions crates/libs/core/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ impl<'a, I: Interface> InterfaceRef<'a, I> {
/// Calls AddRef on the underlying COM interface and returns an "owned" (counted) reference.
#[inline(always)]
pub fn to_owned(self) -> I {
let interface: &I = &*self;
interface.clone()
(*self).clone()
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/libs/implement/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub fn implement(attributes: proc_macro::TokenStream, original_type: proc_macro:
}
}

unsafe impl #generics ::windows_core::imp::ComImpl for #original_ident::#generics where #constraints {
impl #generics ::windows_core::imp::ComImpl for #original_ident::#generics where #constraints {
type Outer = #impl_ident::#generics;
}

Expand Down

0 comments on commit 9f7a58b

Please sign in to comment.