[pve-devel] [PATCH proxmox-ve-rs] config: fix a few clippy warnings

Christoph Heiss c.heiss at proxmox.com
Fri Jan 17 08:51:11 CET 2025


.. as newly introduced with 1.84.

Namely `elided_named_lifetimes` for the change of `SdnConfig` and
`clippy::needless_lifetimes` for the rest.

Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
 proxmox-ve-config/src/firewall/parse.rs | 6 +++---
 proxmox-ve-config/src/sdn/config.rs     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/proxmox-ve-config/src/firewall/parse.rs b/proxmox-ve-config/src/firewall/parse.rs
index 7bf00c0..8cf4757 100644
--- a/proxmox-ve-config/src/firewall/parse.rs
+++ b/proxmox-ve-config/src/firewall/parse.rs
@@ -316,7 +316,7 @@ pub mod serde_option_log_ratelimit {
 #[derive(Clone, Copy, Debug)]
 pub struct SomeStrDeserializer<'a, E>(serde::de::value::StrDeserializer<'a, E>);
 
-impl<'de, 'a, E> serde::de::Deserializer<'de> for SomeStrDeserializer<'a, E>
+impl<'de, E> serde::de::Deserializer<'de> for SomeStrDeserializer<'_, E>
 where
     E: serde::de::Error,
 {
@@ -379,7 +379,7 @@ impl<'a> From<&'a str> for SomeStr<'a> {
     }
 }
 
-impl<'de, 'a, E> serde::de::IntoDeserializer<'de, E> for SomeStr<'a>
+impl<'a, E> serde::de::IntoDeserializer<'_, E> for SomeStr<'a>
 where
     E: serde::de::Error,
 {
@@ -465,7 +465,7 @@ impl From<String> for SomeString {
     }
 }
 
-impl<'de, E> serde::de::IntoDeserializer<'de, E> for SomeString
+impl<E> serde::de::IntoDeserializer<'_, E> for SomeString
 where
     E: serde::de::Error,
 {
diff --git a/proxmox-ve-config/src/sdn/config.rs b/proxmox-ve-config/src/sdn/config.rs
index 7ee1101..880efc2 100644
--- a/proxmox-ve-config/src/sdn/config.rs
+++ b/proxmox-ve-config/src/sdn/config.rs
@@ -544,7 +544,7 @@ impl SdnConfig {
     pub fn ipsets<'a>(
         &'a self,
         filter: Option<&'a Allowlist<VnetName>>,
-    ) -> impl Iterator<Item = Ipset> + '_ {
+    ) -> impl Iterator<Item = Ipset> + 'a {
         self.zones
             .values()
             .flat_map(|zone| zone.vnets())
-- 
2.47.0





More information about the pve-devel mailing list