Skip to content

Commit

Permalink
Remove use of std in windows-strings macro (#3356)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthib authored Nov 30, 2024
1 parent d41381d commit 30a574a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/libs/strings/src/literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ macro_rules! h {
#[allow(clippy::declare_interior_mutable_const)]
const RESULT: $crate::HSTRING = {
if OUTPUT_LEN == 1 {
unsafe { ::std::mem::transmute(::std::ptr::null::<u16>()) }
unsafe { ::core::mem::transmute(::core::ptr::null::<u16>()) }
} else {
const OUTPUT: $crate::PCWSTR = $crate::w!($s);
const HEADER: $crate::HSTRING_HEADER = $crate::HSTRING_HEADER {
Expand All @@ -56,7 +56,7 @@ macro_rules! h {
};
// SAFETY: an `HSTRING` is exactly equivalent to a pointer to an `HSTRING_HEADER`
unsafe {
::std::mem::transmute::<&$crate::HSTRING_HEADER, $crate::HSTRING>(&HEADER)
::core::mem::transmute::<&$crate::HSTRING_HEADER, $crate::HSTRING>(&HEADER)
}
}
};
Expand Down

0 comments on commit 30a574a

Please sign in to comment.