Skip to content

Commit c3806d8

Browse files
committed
hex-literal: use const block to force const promotion
1 parent 1701e2a commit c3806d8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hex-literal/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ macro_rules! hex {
8282
($($s:literal)*) => {{
8383
const STRINGS: &[&'static [u8]] = &[$($s.as_bytes(),)*];
8484
const LEN: usize = $crate::len(STRINGS);
85-
const RES: [u8; LEN] = $crate::decode(STRINGS);
86-
RES
85+
const { $crate::decode(STRINGS) }
8786
}};
8887
}

0 commit comments

Comments
 (0)