From ede73a6561ba4132df920fb7867f049177497d4c Mon Sep 17 00:00:00 2001 From: Max Carrara Date: Mon, 21 Aug 2023 13:48:15 +0200 Subject: [PATCH] client/login: clippy fixes Signed-off-by: Max Carrara --- proxmox-client/src/lib.rs | 4 ++-- proxmox-login/src/tfa.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs index 4da079dd..06f57ff4 100644 --- a/proxmox-client/src/lib.rs +++ b/proxmox-client/src/lib.rs @@ -85,13 +85,13 @@ impl HttpApiResponse { match self.content_type.as_deref() { Some("application/json") => Ok(()), Some(other) => { - return Err(Error::BadApi( + Err(Error::BadApi( format!("expected json body, got {other}",), None, )) } None => { - return Err(Error::BadApi( + Err(Error::BadApi( "expected json body, but no Content-Type was sent".to_string(), None, )) diff --git a/proxmox-login/src/tfa.rs b/proxmox-login/src/tfa.rs index 9f405892..afe44d11 100644 --- a/proxmox-login/src/tfa.rs +++ b/proxmox-login/src/tfa.rs @@ -71,7 +71,7 @@ mod bytes_as_base64url_nopad { pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result, D::Error> { use serde::de::Error; String::deserialize(deserializer).and_then(|string| { - base64::decode_config(&string, base64::URL_SAFE_NO_PAD) + base64::decode_config(string, base64::URL_SAFE_NO_PAD) .map_err(|err| Error::custom(err.to_string())) }) }