diff options
Diffstat (limited to 'base')
| -rw-r--r-- | base/src/permission.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/base/src/permission.rs b/base/src/permission.rs index 8993154..382a16e 100644 --- a/base/src/permission.rs +++ b/base/src/permission.rs @@ -3,19 +3,19 @@ use anyhow::anyhow;  use jellycommon::user::{PermissionSet, UserPermission};  pub trait PermissionSetExt { -    fn check(&self, perm: UserPermission) -> bool; -    fn assert(&self, perm: UserPermission) -> Result<(), anyhow::Error>; +    fn check(&self, perm: &UserPermission) -> bool; +    fn assert(&self, perm: &UserPermission) -> Result<(), anyhow::Error>;  }  impl PermissionSetExt for PermissionSet { -    fn check(&self, perm: UserPermission) -> bool { +    fn check(&self, perm: &UserPermission) -> bool {          *self              .0              .get(&perm)              .or(CONF.default_permission_set.0.get(&perm))              .unwrap_or(&perm.default_value())      } -    fn assert(&self, perm: UserPermission) -> Result<(), anyhow::Error> { +    fn assert(&self, perm: &UserPermission) -> Result<(), anyhow::Error> {          if self.check(perm) {              Ok(())          } else { | 
