Skip to content

Commit ca47366

Browse files
committed
Add #[inline] to LenType trait methods
1 parent 92dbf9c commit ca47366

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/len_type.rs

+2
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ pub trait Sealed:
2626
const MAX: usize;
2727

2828
/// An infallible conversion from `usize` to `LenT`.
29+
#[inline]
2930
fn from_usize(val: usize) -> Self {
3031
val.try_into().unwrap()
3132
}
3233

3334
/// An infallible conversion from `LenT` to `usize`.
35+
#[inline]
3436
fn into_usize(self) -> usize {
3537
self.try_into().unwrap()
3638
}

0 commit comments

Comments
 (0)