From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id EDA501FF170 for ; Tue, 3 Dec 2024 11:21:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B24134AE; Tue, 3 Dec 2024 11:21:13 +0100 (CET) From: Maximiliano Sandoval To: pbs-devel@lists.proxmox.com Date: Tue, 3 Dec 2024 11:20:34 +0100 Message-Id: <20241203102038.166031-6-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241203102038.166031-1-m.sandoval@proxmox.com> References: <20241203102038.166031-1-m.sandoval@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.108 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox 06/10] elide lifetimes where possible X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" This is possible on newer rustc. Signed-off-by: Maximiliano Sandoval --- proxmox-api-macro/src/api/method.rs | 4 ++-- proxmox-api-macro/src/util.rs | 2 +- proxmox-client/src/lib.rs | 2 +- proxmox-compression/src/zstd.rs | 6 +++--- proxmox-ldap/src/lib.rs | 2 +- proxmox-schema/src/de/mod.rs | 8 ++++---- proxmox-schema/src/de/no_schema.rs | 6 +++--- proxmox-schema/src/property_string.rs | 2 +- proxmox-schema/src/upid.rs | 2 +- proxmox-sendmail/src/lib.rs | 2 +- proxmox-sys/src/fs/acl.rs | 2 +- proxmox-tfa/src/api/webauthn.rs | 2 +- proxmox-uuid/src/lib.rs | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/proxmox-api-macro/src/api/method.rs b/proxmox-api-macro/src/api/method.rs index fd961cae..d170a9d5 100644 --- a/proxmox-api-macro/src/api/method.rs +++ b/proxmox-api-macro/src/api/method.rs @@ -935,7 +935,7 @@ fn serialize_input_schema( struct DefaultParameters<'a>(&'a Schema); -impl<'a> VisitMut for DefaultParameters<'a> { +impl VisitMut for DefaultParameters<'_> { fn visit_expr_mut(&mut self, i: &mut syn::Expr) { if let syn::Expr::Macro(exprmac) = i { if exprmac.mac.path.is_ident("api_get_default") { @@ -955,7 +955,7 @@ impl<'a> VisitMut for DefaultParameters<'a> { } } -impl<'a> DefaultParameters<'a> { +impl DefaultParameters<'_> { fn get_default(&self, param_tokens: TokenStream) -> Result { let param_name: syn::LitStr = syn::parse2(param_tokens)?; match self.0.find_obj_property_by_ident(¶m_name.value()) { diff --git a/proxmox-api-macro/src/util.rs b/proxmox-api-macro/src/util.rs index adacd225..11a83e46 100644 --- a/proxmox-api-macro/src/util.rs +++ b/proxmox-api-macro/src/util.rs @@ -689,7 +689,7 @@ pub struct DerivedItems<'a> { attributes: std::slice::Iter<'a, syn::Attribute>, } -impl<'a> Iterator for DerivedItems<'a> { +impl Iterator for DerivedItems<'_> { type Item = syn::Path; fn next(&mut self) -> Option { diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs index c6e3cf02..2277103d 100644 --- a/proxmox-client/src/lib.rs +++ b/proxmox-client/src/lib.rs @@ -234,7 +234,7 @@ where } } -impl<'c, C> HttpApiClient for &'c C +impl HttpApiClient for &C where C: HttpApiClient, { diff --git a/proxmox-compression/src/zstd.rs b/proxmox-compression/src/zstd.rs index d73610b7..7e303833 100644 --- a/proxmox-compression/src/zstd.rs +++ b/proxmox-compression/src/zstd.rs @@ -32,7 +32,7 @@ pub struct ZstdEncoder<'a, T> { state: EncoderState, } -impl<'a, T, O, E> ZstdEncoder<'a, T> +impl ZstdEncoder<'_, T> where T: Stream> + Unpin, O: Into, @@ -55,7 +55,7 @@ where } } -impl<'a, T> ZstdEncoder<'a, T> { +impl ZstdEncoder<'_, T> { /// Returns the wrapped [Stream] pub fn into_inner(self) -> T { self.inner @@ -80,7 +80,7 @@ impl<'a, T> ZstdEncoder<'a, T> { } } -impl<'a, T, O, E> Stream for ZstdEncoder<'a, T> +impl Stream for ZstdEncoder<'_, T> where T: Stream> + Unpin, O: Into, diff --git a/proxmox-ldap/src/lib.rs b/proxmox-ldap/src/lib.rs index 4766f338..31f118ad 100644 --- a/proxmox-ldap/src/lib.rs +++ b/proxmox-ldap/src/lib.rs @@ -392,7 +392,7 @@ enum FilterElement<'a> { Verbatim(&'a str), } -impl<'a> Display for FilterElement<'a> { +impl Display for FilterElement<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { fn write_children(f: &mut Formatter<'_>, children: &[FilterElement]) -> std::fmt::Result { for child in children { diff --git a/proxmox-schema/src/de/mod.rs b/proxmox-schema/src/de/mod.rs index 79fb18e7..52897fea 100644 --- a/proxmox-schema/src/de/mod.rs +++ b/proxmox-schema/src/de/mod.rs @@ -155,7 +155,7 @@ impl<'de, 'i> SchemaDeserializer<'de, 'i> { } } -impl<'de, 'i> de::Deserializer<'de> for SchemaDeserializer<'de, 'i> { +impl<'de> de::Deserializer<'de> for SchemaDeserializer<'de, '_> { type Error = Error; fn deserialize_any(self, visitor: V) -> Result @@ -410,7 +410,7 @@ impl<'o, 'i, 's> SeqAccess<'o, 'i, 's> { } } -impl<'de, 'i, 's> de::SeqAccess<'de> for SeqAccess<'de, 'i, 's> { +impl<'de> de::SeqAccess<'de> for SeqAccess<'de, '_, '_> { type Error = Error; fn next_element_seed(&mut self, seed: T) -> Result, Error> @@ -448,7 +448,7 @@ impl<'de, 'i, 's> de::SeqAccess<'de> for SeqAccess<'de, 'i, 's> { } } -impl<'de, 'i, 's> de::Deserializer<'de> for SeqAccess<'de, 'i, 's> { +impl<'de> de::Deserializer<'de> for SeqAccess<'de, '_, '_> { type Error = Error; fn deserialize_any(self, visitor: V) -> Result @@ -538,7 +538,7 @@ impl<'de, 'i> MapAccess<'de, 'i> { } } -impl<'de, 'i> de::MapAccess<'de> for MapAccess<'de, 'i> { +impl<'de> de::MapAccess<'de> for MapAccess<'de, '_> { type Error = Error; fn next_key_seed(&mut self, seed: K) -> Result, Error> diff --git a/proxmox-schema/src/de/no_schema.rs b/proxmox-schema/src/de/no_schema.rs index 45fe08cd..747ef44a 100644 --- a/proxmox-schema/src/de/no_schema.rs +++ b/proxmox-schema/src/de/no_schema.rs @@ -12,7 +12,7 @@ pub struct NoSchemaDeserializer<'de, 'i> { input: Cow3<'de, 'i, str>, } -impl<'de, 'i> NoSchemaDeserializer<'de, 'i> { +impl<'de> NoSchemaDeserializer<'de, '_> { pub fn new(input: T) -> Self where T: Into>, @@ -35,7 +35,7 @@ macro_rules! deserialize_num { )*} } -impl<'de, 'i> de::Deserializer<'de> for NoSchemaDeserializer<'de, 'i> { +impl<'de> de::Deserializer<'de> for NoSchemaDeserializer<'de, '_> { type Error = Error; fn deserialize_any(self, visitor: V) -> Result @@ -264,7 +264,7 @@ impl<'de, 'i> SimpleSeqAccess<'de, 'i> { } } -impl<'de, 'i> de::SeqAccess<'de> for SimpleSeqAccess<'de, 'i> { +impl<'de> de::SeqAccess<'de> for SimpleSeqAccess<'de, '_> { type Error = Error; fn next_element_seed(&mut self, seed: T) -> Result, Error> diff --git a/proxmox-schema/src/property_string.rs b/proxmox-schema/src/property_string.rs index 7b5a4ed1..e0620115 100644 --- a/proxmox-schema/src/property_string.rs +++ b/proxmox-schema/src/property_string.rs @@ -85,7 +85,7 @@ pub(crate) fn next_property(mut data: &str) -> Option std::iter::FusedIterator for PropertyIterator<'a> {} +impl std::iter::FusedIterator for PropertyIterator<'_> {} /// Parse a quoted string and move `data` to after the closing quote. /// diff --git a/proxmox-schema/src/upid.rs b/proxmox-schema/src/upid.rs index 0c68871e..9bbb66a1 100644 --- a/proxmox-schema/src/upid.rs +++ b/proxmox-schema/src/upid.rs @@ -123,7 +123,7 @@ impl<'de> serde::Deserialize<'de> for UPID { { struct ForwardToStrVisitor; - impl<'a> serde::de::Visitor<'a> for ForwardToStrVisitor { + impl serde::de::Visitor<'_> for ForwardToStrVisitor { type Value = UPID; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/proxmox-sendmail/src/lib.rs b/proxmox-sendmail/src/lib.rs index e7e2982f..050c3322 100644 --- a/proxmox-sendmail/src/lib.rs +++ b/proxmox-sendmail/src/lib.rs @@ -71,7 +71,7 @@ struct Attachment<'a> { content: &'a [u8], } -impl<'a> Attachment<'a> { +impl Attachment<'_> { fn format_attachment(&self, file_boundary: &str) -> String { use std::fmt::Write; diff --git a/proxmox-sys/src/fs/acl.rs b/proxmox-sys/src/fs/acl.rs index 6f256008..5ae69296 100644 --- a/proxmox-sys/src/fs/acl.rs +++ b/proxmox-sys/src/fs/acl.rs @@ -178,7 +178,7 @@ pub struct ACLEntry<'a> { _phantom: PhantomData<&'a mut ()>, } -impl<'a> ACLEntry<'a> { +impl ACLEntry<'_> { pub fn get_tag_type(&self) -> Result { let mut tag = ACL_UNDEFINED_TAG; let res = unsafe { acl_get_tag_type(self.ptr, &mut tag as *mut ACLTag) }; diff --git a/proxmox-tfa/src/api/webauthn.rs b/proxmox-tfa/src/api/webauthn.rs index 4c854011..1793df97 100644 --- a/proxmox-tfa/src/api/webauthn.rs +++ b/proxmox-tfa/src/api/webauthn.rs @@ -123,7 +123,7 @@ pub(super) struct WebauthnConfigInstance<'a> { /// /// Note that we may consider changing this so `get_origin` returns the `Host:` header provided by /// the connecting client. -impl<'a> webauthn_rs::WebauthnConfig for WebauthnConfigInstance<'a> { +impl webauthn_rs::WebauthnConfig for WebauthnConfigInstance<'_> { fn get_relying_party_name(&self) -> &str { self.rp } diff --git a/proxmox-uuid/src/lib.rs b/proxmox-uuid/src/lib.rs index cd55a540..09a70b49 100644 --- a/proxmox-uuid/src/lib.rs +++ b/proxmox-uuid/src/lib.rs @@ -201,7 +201,7 @@ impl<'de> serde::Deserialize<'de> for Uuid { struct ForwardToStrVisitor; - impl<'a> serde::de::Visitor<'a> for ForwardToStrVisitor { + impl serde::de::Visitor<'_> for ForwardToStrVisitor { type Value = Uuid; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel