Inline 2 functions that appear in dep-graph profiles.

This commit is contained in:
Camille GILLOT 2024-01-14 12:57:13 +00:00
parent 284cb714d2
commit c6f83b8ff6
2 changed files with 2 additions and 0 deletions

View File

@ -263,6 +263,7 @@ impl #name {
impl std::ops::Add<usize> for #name {
type Output = Self;
#[inline]
fn add(self, other: usize) -> Self {
Self::from_usize(self.index() + other)
}

View File

@ -169,6 +169,7 @@ fn mask(self) -> u32 {
}
}
#[inline]
fn mask(bits: usize) -> usize {
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
}