Inlining helper func for permission checking

This commit is contained in:
shockrah 2021-02-03 19:31:38 -08:00
parent e36d0e5823
commit 45af62ceb3

View File

@ -34,3 +34,9 @@ pub fn get_perm_mask(path: &str) -> Option<u64> {
_ => 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;
}