Inlining helper func for permission checking
This commit is contained in:
parent
e36d0e5823
commit
45af62ceb3
@ -34,3 +34,9 @@ pub fn get_perm_mask(path: &str) -> Option<u64> {
|
|||||||
_ => Some(0)
|
_ => Some(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn has_perm(mask: u64, target: u64) -> bool {
|
||||||
|
// Check if the given mask contains the target permissions mask
|
||||||
|
return (mask & target) == target;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user