Inline 2 functions that appear in dep-graph profiles.
This commit is contained in:
parent
284cb714d2
commit
c6f83b8ff6
2 changed files with 2 additions and 0 deletions
|
@ -263,6 +263,7 @@ impl Parse for Newtype {
|
||||||
impl std::ops::Add<usize> for #name {
|
impl std::ops::Add<usize> for #name {
|
||||||
type Output = Self;
|
type Output = Self;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn add(self, other: usize) -> Self {
|
fn add(self, other: usize) -> Self {
|
||||||
Self::from_usize(self.index() + other)
|
Self::from_usize(self.index() + other)
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,6 +169,7 @@ impl EdgeHeader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
fn mask(bits: usize) -> usize {
|
fn mask(bits: usize) -> usize {
|
||||||
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
|
usize::MAX >> ((std::mem::size_of::<usize>() * 8) - bits)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue