From 1c3af08a377d1d0ea5e10f8c3e2b9ddd229c7d47 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Thu, 20 Jun 2024 13:50:18 +0200 Subject: [PATCH] pmg-rs: tfa: clippy: the borrowed expression implements the required traits Signed-off-by: Lukas Wagner --- pmg-rs/src/tfa.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmg-rs/src/tfa.rs b/pmg-rs/src/tfa.rs index 928b50b..af69721 100644 --- a/pmg-rs/src/tfa.rs +++ b/pmg-rs/src/tfa.rs @@ -178,7 +178,7 @@ mod export { #[try_from_ref] this: &Tfa, ) -> Result<(Option, Option), Error> { Ok(match this.inner.lock().unwrap().webauthn.clone() { - Some(config) => (Some(hex::encode(&config.digest())), Some(config.into())), + Some(config) => (Some(hex::encode(config.digest())), Some(config.into())), None => (None, None), }) } @@ -644,7 +644,7 @@ impl proxmox_tfa::api::OpenUserChallengeData for UserAccess { fn remove(&self, userid: &str) -> Result { let path = challenge_data_path(userid, self.is_debug()); - match std::fs::remove_file(&path) { + match std::fs::remove_file(path) { Ok(()) => Ok(true), Err(err) if err.kind() == io::ErrorKind::NotFound => Ok(false), Err(err) => Err(err.into()),