Skip to content

Commit 1256fbe

Browse files
authored
Fix for Clippy HSTRING interior mutability warnings in nightly (#3021)
1 parent 7b3de56 commit 1256fbe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/libs/core/src/strings/literals.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ macro_rules! h {
4141
($s:literal) => {{
4242
const INPUT: &[u8] = $s.as_bytes();
4343
const OUTPUT_LEN: usize = $crate::utf16_len(INPUT) + 1;
44+
#[allow(clippy::declare_interior_mutable_const)]
4445
const RESULT: $crate::HSTRING = {
4546
if OUTPUT_LEN == 1 {
4647
unsafe { ::std::mem::transmute(::std::ptr::null::<u16>()) }
@@ -51,6 +52,7 @@ macro_rules! h {
5152
unsafe { ::std::mem::transmute::<&$crate::HSTRING_HEADER, $crate::HSTRING>(&HEADER) }
5253
}
5354
};
55+
#[allow(clippy::borrow_interior_mutable_const)]
5456
&RESULT
5557
}};
5658
}

0 commit comments

Comments
 (0)