mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-10-02 23:04:40 +00:00
feat(string): make from_utf8_unchecked
const
This commit is contained in:
parent
96af9f7707
commit
aab8b6667e
@ -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 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user