Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Apr 8, 2024
1 parent 508f336 commit b76be28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/libs/core/src/agile_reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ impl<T: Interface> AgileReference<T> {
pub fn new(object: &T) -> Result<Self> {
// TODO: this assert is required until we can catch this at compile time using an "associated const equality" constraint.
// For example, <T: Interface<UNKNOWN = true>>
// https://github.com/rust-lang/rust/issues/92827
// https://github.com/rust-lang/rust/issues/92827
assert!(T::UNKNOWN);
unsafe { imp::RoGetAgileReference(imp::AGILEREFERENCE_DEFAULT, &T::IID, std::mem::transmute::<&T, &IUnknown>(object)).map(|reference| Self(reference, Default::default())) }
}
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/core/src/imp/factory_cache.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::*;
use crate::Interface;
use std::ffi::c_void;
use std::marker::PhantomData;
use std::sync::atomic::{AtomicPtr, Ordering};
use std::ffi::c_void;

#[doc(hidden)]
pub struct FactoryCache<C, I> {
Expand Down
4 changes: 3 additions & 1 deletion crates/samples/windows/credentials/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ fn main() -> windows::core::Result<()> {
println!();
}

CredFree(std::mem::transmute::<*mut *mut _, *const _>(credentials_ptr));
CredFree(std::mem::transmute::<*mut *mut _, *const _>(
credentials_ptr,
));
}

Ok(())
Expand Down

0 comments on commit b76be28

Please sign in to comment.