(s: &str)
| 16 | /// or `None` if the argument is longer than `N` bytes. |
| 17 | #[allow(clippy::should_implement_trait)] |
| 18 | pub fn from_str(s: &str) -> Option<Self> { |
| 19 | (s.len() <= N).then(|| Self { inner: s.into() }) |
| 20 | } |
| 21 | |
| 22 | /// Construct [`Self`] from a string slice, |
| 23 | /// or allocate a new string containing the first `N` bytes of the slice |