From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-ve-rs] clippy: elide some lifetimes
Date: Mon, 31 Mar 2025 15:40:32 +0200 [thread overview]
Message-ID: <20250331134032.376240-1-g.goller@proxmox.com> (raw)
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@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-03-31 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 13:40 Gabriel Goller [this message]
2025-04-04 16:50 ` Thomas Lamprecht
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=20250331134032.376240-1-g.goller@proxmox.com \
--to=g.goller@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal