5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2024-12-23 17:34:35 +03:00

acl: rename get_node to get_node_mut

get_node will be re-introduced with the next patch, which requires a
non-mut accessor.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-06-08 11:26:36 +02:00
parent 87005234c6
commit 663165d662

View File

@ -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,
};