diff --git a/src/string/mod.rs b/src/string/mod.rs index 6dfe2055..6633580e 100644 --- a/src/string/mod.rs +++ b/src/string/mod.rs @@ -237,7 +237,7 @@ impl String { /// assert_eq!("💖", sparkle_heart); /// ``` #[inline] - pub unsafe fn from_utf8_unchecked(vec: Vec) -> Self { + pub const unsafe fn from_utf8_unchecked(vec: Vec) -> Self { Self { vec } }