mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 21:10:28 +00:00
Add #[inline] to LenType trait methods
This commit is contained in:
parent
92dbf9c1e1
commit
ca47366a71
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user