From 05d11426a8e60fa060733eb8ae7843bc2ae9725c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 10 Jun 2024 15:28:36 +0200 Subject: apply many clippy issue --- base/src/permission.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'base/src/permission.rs') diff --git a/base/src/permission.rs b/base/src/permission.rs index 15b24a9..358202f 100644 --- a/base/src/permission.rs +++ b/base/src/permission.rs @@ -21,9 +21,9 @@ pub trait PermissionSetExt { impl PermissionSetExt for PermissionSet { fn check_explicit(&self, perm: &UserPermission) -> Option { self.0 - .get(&perm) - .or(CONF.default_permission_set.0.get(&perm)) - .map(|v| *v) + .get(perm) + .or(CONF.default_permission_set.0.get(perm)) + .copied() } fn assert(&self, perm: &UserPermission) -> Result<(), anyhow::Error> { if self.check(perm) { @@ -61,6 +61,6 @@ fn check_node_permission(perms: &PermissionSet, node: &Node) -> bool { return v; } } - return true; + true } } -- cgit v1.2.3-70-g09d2