(s: &'a str)
| 1229 | /// The caller must ensure that `s.len() <= u32::MAX`. |
| 1230 | #[inline] |
| 1231 | const unsafe fn from_str_unchecked(s: &'a str) -> Self { |
| 1232 | // SAFETY: Caller has promised that `s.len() <= u32::MAX`. |
| 1233 | let raw = unsafe { SlimSlice::from_slice_unchecked(s.as_bytes()) }; |
| 1234 | // SAFETY: `s: &str` is always UTF-8. |
| 1235 | Self { raw } |
| 1236 | } |
| 1237 | } |
| 1238 | |
| 1239 | impl Deref for SlimStr<'_> { |