From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-perl-rs 3/3] pve: tfa: write char comparison more succinctly
Date: Mon, 10 Mar 2025 10:39:04 +0100 [thread overview]
Message-ID: <20250310093904.145369-3-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250310093904.145369-1-m.sandoval@proxmox.com>
Fixes the manual_pattern_char_comparison clippy lint.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
pve-rs/src/tfa.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs
index 66dca3d..2cd7396 100644
--- a/pve-rs/src/tfa.rs
+++ b/pve-rs/src/tfa.rs
@@ -726,7 +726,7 @@ fn decode_old_oath_entry(
let mut out = Vec::new();
let keys = take_json_string(&mut obj, "keys", "oath")?;
- for key in keys.split(|c| c == ',' || c == ';' || c == ' ') {
+ for key in keys.split([',', ';', ' ']) {
let key = trim_ascii_whitespace(key.as_bytes());
if key.is_empty() {
continue;
@@ -765,7 +765,7 @@ fn decode_old_yubico_entry(data: JsonValue) -> Result<Vec<String>, Error> {
let mut out = Vec::new();
let keys = take_json_string(&mut obj, "keys", "yubico")?;
- for key in keys.split(|c| c == ',' || c == ';' || c == ' ') {
+ for key in keys.split([',', ';', ' ']) {
let key = trim_ascii_whitespace(key.as_bytes());
if key.is_empty() {
continue;
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-10 9:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 9:39 [pve-devel] [PATCH proxmox-perl-rs 1/3] pve: Port to 2024 edition Maximiliano Sandoval
2025-03-10 9:39 ` [pve-devel] [PATCH proxmox-perl-rs 2/3] pmg: " Maximiliano Sandoval
2025-03-10 9:39 ` Maximiliano Sandoval [this message]
2025-03-10 10:16 ` [pve-devel] [PATCH proxmox-perl-rs 1/3] pve: " Maximiliano Sandoval
2025-03-10 10:18 ` [pve-devel] applied-series: " 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=20250310093904.145369-3-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.