From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox v3 3/5] pve-api-types: fix clippy lints
Date: Wed, 19 Nov 2025 15:06:01 +0100 [thread overview]
Message-ID: <20251119140609.230763-4-s.sterz@proxmox.com> (raw)
In-Reply-To: <20251119140609.230763-1-s.sterz@proxmox.com>
by adding liftime parameters and removing an unnecessary assignment.
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
---
pve-api-types/src/types/array.rs | 4 ++--
pve-api-types/src/types/macros.rs | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/pve-api-types/src/types/array.rs b/pve-api-types/src/types/array.rs
index d17fa992..6f468fbf 100644
--- a/pve-api-types/src/types/array.rs
+++ b/pve-api-types/src/types/array.rs
@@ -89,12 +89,12 @@ impl<T, const MAX: usize> ArrayMap<T, { MAX }> {
}
/// Iterator through `(index, &value)` pairs.
- pub fn iter(&self) -> btree_map::Iter<usize, T> {
+ pub fn iter(&self) -> btree_map::Iter<'_, usize, T> {
self.inner.iter()
}
/// Iterator through `(index, &mut value)` pairs.
- pub fn iter_mut(&mut self) -> btree_map::IterMut<usize, T> {
+ pub fn iter_mut(&mut self) -> btree_map::IterMut<'_, usize, T> {
self.inner.iter_mut()
}
diff --git a/pve-api-types/src/types/macros.rs b/pve-api-types/src/types/macros.rs
index e6116782..8e5c3f02 100644
--- a/pve-api-types/src/types/macros.rs
+++ b/pve-api-types/src/types/macros.rs
@@ -49,7 +49,6 @@ pub(crate) const fn write_name_index(to: &mut [u8], name: &'static str, mut inde
}
if index == 0 {
to[len] = b'0';
- len += 1;
} else {
let mut digits = 0;
let mut copy = index;
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-19 14:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 14:05 [pdm-devel] [PATCH datacenter-manager/proxmox{, -backup}/widget-toolkit v3 00/10] unstable flag and pdm api viewer Shannon Sterz
2025-11-19 14:05 ` [pdm-devel] [PATCH proxmox v3 1/5] router/api-macro: add unstable flag for ApiMethod Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 2/5] pve-api-types: generate array objects Shannon Sterz
2025-11-19 14:06 ` Shannon Sterz [this message]
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 4/5] docgen: add docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox v3 5/5] docgen: add support for the new stable flag Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH widget-toolkit v3 1/1] api viewer: add support for endpoints that are marked as unstable Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox-backup v3 1/2] docgen: use proxmox-rs docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH proxmox-backup v3 2/2] notifications/pbsXtoX: adapt to proxmox-apt making old_version optional Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH datacenter-manager v3 1/2] docgen: switch to proxmox-rs docgen crate Shannon Sterz
2025-11-19 14:06 ` [pdm-devel] [PATCH datacenter-manager v3 2/2] api-viewer: add an api-viewer package Shannon Sterz
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=20251119140609.230763-4-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pdm-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