[pve-devel] [PATCH proxmox-ve-rs] clippy: elide some lifetimes
Gabriel Goller
g.goller at proxmox.com
Mon Mar 31 15:40:32 CEST 2025
Elide some lifetimes to avoid clippy warnings:
warning: the following explicit lifetimes could be elided: 'a
--> proxmox-ve-config/src/firewall/parse.rs:319:11
|
319 | impl<'de, 'a, E> serde::de::Deserializer<'de> for SomeStrDeserializer<'a, E>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
319 - impl<'de, 'a, E> serde::de::Deserializer<'de> for SomeStrDeserializer<'a, E>
319 + impl<'de, E> serde::de::Deserializer<'de> for SomeStrDeserializer<'_, E>
|
warning: the following explicit lifetimes could be elided: 'de
--> proxmox-ve-config/src/firewall/parse.rs:382:6
|
382 | impl<'de, 'a, E> serde::de::IntoDeserializer<'de, E> for SomeStr<'a>
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
382 - impl<'de, 'a, E> serde::de::IntoDeserializer<'de, E> for SomeStr<'a>
382 + impl<'a, E> serde::de::IntoDeserializer<'_, E> for SomeStr<'a>
|
warning: the following explicit lifetimes could be elided: 'de
--> proxmox-ve-config/src/firewall/parse.rs:468:6
|
468 | impl<'de, E> serde::de::IntoDeserializer<'de, E> for SomeString
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
468 - impl<'de, E> serde::de::IntoDeserializer<'de, E> for SomeString
468 + impl<E> serde::de::IntoDeserializer<'_, E> for SomeString
|
Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
---
proxmox-ve-config/src/firewall/parse.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/proxmox-ve-config/src/firewall/parse.rs b/proxmox-ve-config/src/firewall/parse.rs
index 7bf00c08cbf7..8cf475740eab 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,
{
--
2.39.5
More information about the pve-devel
mailing list