diff --git a/server/esp/src/types/fast_string.rs b/server/esp/src/types/fast_string.rs index 9f726f2fe..a175eb91e 100644 --- a/server/esp/src/types/fast_string.rs +++ b/server/esp/src/types/fast_string.rs @@ -295,8 +295,8 @@ impl FastString { /// Converts the string to a `&str`, bypassing utf-8 validation checks #[inline] - pub unsafe fn to_str_unchecked(&self) -> &str { - std::str::from_utf8_unchecked(self.as_bytes()) + pub fn to_str_unchecked(&self) -> &str { + unsafe std::str::from_utf8_unchecked(self.as_bytes()) } /// Converts the string to a `&str`, returns """ if utf-8 validation fails