[pdm-devel] [PATCH proxmox v3 3/5] pve-api-types: fix clippy lints
Shannon Sterz
s.sterz at proxmox.com
Wed Nov 19 15:06:01 CET 2025
by adding liftime parameters and removing an unnecessary assignment.
Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
Tested-by: Lukas Wagner <l.wagner at proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner at 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
More information about the pdm-devel
mailing list