Skip to content

Commit 9f45062

Browse files
authored
Inline try_cast_into() (#2415)
This significantly improves codegen on embedded targets, allowing many checks to be optimized out.
1 parent 07cdb8b commit 9f45062

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/pointer/inner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ impl<'a> PtrInner<'a, [u8]> {
394394
/// `self`. Finally:
395395
/// - If this is a prefix cast, `ptr` has the same address as `self`.
396396
/// - If this is a suffix cast, `remainder` has the same address as `self`.
397+
#[inline]
397398
pub(crate) fn try_cast_into<U>(
398399
self,
399400
cast_type: CastType,

0 commit comments

Comments
 (0)