Add some more #[inline] annotations for trivial functions (#2817)
Looking at some profiles these or their related functions were all showing up, so this commit adds `#[inline]` to allow cross-crate inlining by default.
This commit is contained in:
@@ -44,6 +44,7 @@ fn cast_to_u32(sz: usize) -> u32 {
|
||||
}
|
||||
|
||||
/// Align an offset used in this module to a specific byte-width by rounding up
|
||||
#[inline]
|
||||
fn align(offset: u32, width: u32) -> u32 {
|
||||
(offset + (width - 1)) / width * width
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user