feat(string): make from_utf8_unchecked const

This commit is contained in:
Ammar Arif 2025-01-22 16:14:50 -05:00 committed by Markus Reiter
parent 96af9f7707
commit aab8b6667e

View File

@ -237,7 +237,7 @@ impl<const N: usize> String<N> {
/// assert_eq!("💖", sparkle_heart); /// assert_eq!("💖", sparkle_heart);
/// ``` /// ```
#[inline] #[inline]
pub unsafe fn from_utf8_unchecked(vec: Vec<u8, N>) -> Self { pub const unsafe fn from_utf8_unchecked(vec: Vec<u8, N>) -> Self {
Self { vec } Self { vec }
} }