Add #[inline] to LenType trait methods

This commit is contained in:
GnomedDev 2025-04-07 11:07:40 +01:00
parent 92dbf9c1e1
commit ca47366a71
No known key found for this signature in database

View File

@ -26,11 +26,13 @@ pub trait Sealed:
const MAX: usize;
/// An infallible conversion from `usize` to `LenT`.
#[inline]
fn from_usize(val: usize) -> Self {
val.try_into().unwrap()
}
/// An infallible conversion from `LenT` to `usize`.
#[inline]
fn into_usize(self) -> usize {
self.try_into().unwrap()
}