From 663165d6623c09bb0671faa0c16209691ec6ef6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 8 Jun 2022 11:26:36 +0200 Subject: [PATCH] acl: rename get_node to get_node_mut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_node will be re-introduced with the next patch, which requires a non-mut accessor. Signed-off-by: Fabian Grünbichler --- pbs-config/src/acl.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pbs-config/src/acl.rs b/pbs-config/src/acl.rs index 357ae608..58f9b6db 100644 --- a/pbs-config/src/acl.rs +++ b/pbs-config/src/acl.rs @@ -353,10 +353,10 @@ impl AclTree { /// Iterates over the tree looking for a node matching `path`. pub fn find_node(&mut self, path: &str) -> Option<&mut AclTreeNode> { let path = split_acl_path(path); - self.get_node(&path) + self.get_node_mut(&path) } - fn get_node(&mut self, path: &[&str]) -> Option<&mut AclTreeNode> { + fn get_node_mut(&mut self, path: &[&str]) -> Option<&mut AclTreeNode> { let mut node = &mut self.root; for comp in path { node = match node.children.get_mut(*comp) { @@ -381,7 +381,7 @@ impl AclTree { /// does not exist on `path`. pub fn delete_group_role(&mut self, path: &str, group: &str, role: &str) { let path = split_acl_path(path); - let node = match self.get_node(&path) { + let node = match self.get_node_mut(&path) { Some(n) => n, None => return, }; @@ -394,7 +394,7 @@ impl AclTree { /// does not exist on `path`. pub fn delete_user_role(&mut self, path: &str, auth_id: &Authid, role: &str) { let path = split_acl_path(path); - let node = match self.get_node(&path) { + let node = match self.get_node_mut(&path) { Some(n) => n, None => return, };