We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
HSTRING
1 parent 7b3de56 commit 1256fbeCopy full SHA for 1256fbe
crates/libs/core/src/strings/literals.rs
@@ -41,6 +41,7 @@ macro_rules! h {
41
($s:literal) => {{
42
const INPUT: &[u8] = $s.as_bytes();
43
const OUTPUT_LEN: usize = $crate::utf16_len(INPUT) + 1;
44
+ #[allow(clippy::declare_interior_mutable_const)]
45
const RESULT: $crate::HSTRING = {
46
if OUTPUT_LEN == 1 {
47
unsafe { ::std::mem::transmute(::std::ptr::null::<u16>()) }
@@ -51,6 +52,7 @@ macro_rules! h {
51
52
unsafe { ::std::mem::transmute::<&$crate::HSTRING_HEADER, $crate::HSTRING>(&HEADER) }
53
}
54
};
55
+ #[allow(clippy::borrow_interior_mutable_const)]
56
&RESULT
57
}};
58
0 commit comments