tree-wide: fix needless borrows

found and fixed via clippy

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-12-30 12:57:37 +01:00
parent a0c69902c8
commit 9a37bd6c84
104 changed files with 238 additions and 241 deletions

View File

@ -121,7 +121,7 @@ pub fn read_acl(
let mut list: Vec<AclListItem> = Vec::new();
if let Some(path) = &path {
if let Some(node) = &tree.find_node(path) {
extract_acl_node_data(&node, path, &mut list, exact, &auth_id_filter);
extract_acl_node_data(node, path, &mut list, exact, &auth_id_filter);
}
} else {
extract_acl_node_data(&tree.root, "", &mut list, exact, &auth_id_filter);

View File

@ -118,7 +118,7 @@ fn authenticate_2nd(
challenge_ticket: &str,
response: &str,
) -> Result<AuthResult, Error> {
let challenge: TfaChallenge = Ticket::<ApiTicket>::parse(&challenge_ticket)?
let challenge: TfaChallenge = Ticket::<ApiTicket>::parse(challenge_ticket)?
.verify_with_time_frame(public_auth_key(), "PBS", Some(userid.as_str()), -60..600)?
.require_partial()?;