Skip to content

Commit 8e6fa42

Browse files
committed
Always inline pointer-cast functions
1 parent 30c49ef commit 8e6fa42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/zerofrom/src/zf_transparent.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use alloc::boxed::Box;
1313
/// `Outer` is `repr(transparent)` and has one non-zero-sized field
1414
/// of type `Inner`.
1515
#[cfg(feature = "alloc")]
16+
#[inline(always)]
1617
pub unsafe fn cast_transparent_box<Outer, Inner>(inner: Box<Inner>) -> Box<Outer> {
1718
// Safety:
1819
//

0 commit comments

Comments
 (0)