Add inline.
This commit is contained in:
parent
d9c6e70c57
commit
8617ff0f0b
@ -19,11 +19,13 @@ pub struct HirId {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl HirId {
|
impl HirId {
|
||||||
|
#[inline]
|
||||||
pub fn expect_owner(self) -> LocalDefId {
|
pub fn expect_owner(self) -> LocalDefId {
|
||||||
assert_eq!(self.local_id.index(), 0);
|
assert_eq!(self.local_id.index(), 0);
|
||||||
self.owner
|
self.owner
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn as_owner(self) -> Option<LocalDefId> {
|
pub fn as_owner(self) -> Option<LocalDefId> {
|
||||||
if self.local_id.index() == 0 { Some(self.owner) } else { None }
|
if self.local_id.index() == 0 { Some(self.owner) } else { None }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user