From: Max Carrara <m.carrara@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] client/login: clippy fixes
Date: Mon, 21 Aug 2023 13:48:15 +0200 [thread overview]
Message-ID: <20230821114815.837613-1-m.carrara@proxmox.com> (raw)
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
---
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 4da079d..06f57ff 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 9f40589..afe44d1 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<Vec<u8>, 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()))
})
}
--
2.39.2
next reply other threads:[~2023-08-21 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-21 11:48 Max Carrara [this message]
2023-08-22 8:05 ` [pbs-devel] applied: " Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230821114815.837613-1-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox