diff --git a/rust/src/ldap/filters.rs b/rust/src/ldap/filters.rs index 434642ad0f..caa846767f 100644 --- a/rust/src/ldap/filters.rs +++ b/rust/src/ldap/filters.rs @@ -33,7 +33,7 @@ pub enum Filter { ExtensibleMatch(MatchingRuleAssertion), } -impl<'a> From> for Filter { +impl From> for Filter { fn from(f: ldap_parser::filter::Filter) -> Self { match f { ldap_parser::filter::Filter::And(val) => { @@ -123,7 +123,7 @@ pub struct PartialAttribute { pub attr_vals: Vec, } -impl<'a> From<&ldap_parser::filter::PartialAttribute<'a>> for PartialAttribute { +impl From<&ldap_parser::filter::PartialAttribute<'_>> for PartialAttribute { fn from(value: &ldap_parser::filter::PartialAttribute) -> Self { let attr_type = LdapString(value.attr_type.0.to_string()); let attr_vals: Vec = value @@ -145,7 +145,7 @@ pub struct Attribute { pub attr_vals: Vec, } -impl<'a> From<&ldap_parser::filter::Attribute<'a>> for Attribute { +impl From<&ldap_parser::filter::Attribute<'_>> for Attribute { fn from(value: &ldap_parser::filter::Attribute) -> Self { let attr_type = LdapString(value.attr_type.0.to_string()); let attr_vals: Vec = value @@ -166,7 +166,7 @@ pub struct AttributeValueAssertion { pub attribute_desc: LdapString, pub assertion_value: Vec, } -impl<'a> From<&ldap_parser::filter::AttributeValueAssertion<'a>> for AttributeValueAssertion { +impl From<&ldap_parser::filter::AttributeValueAssertion<'_>> for AttributeValueAssertion { fn from(value: &ldap_parser::filter::AttributeValueAssertion) -> Self { let attribute_desc = LdapString(value.attribute_desc.0.to_string()); let assertion_value = value.assertion_value.to_vec(); @@ -203,7 +203,7 @@ pub enum Substring { Any(AssertionValue), Final(AssertionValue), } -impl<'a> From> for Substring { +impl From> for Substring { fn from(value: ldap_parser::filter::Substring) -> Self { match value { ldap_parser::filter::Substring::Initial(val) => { diff --git a/rust/src/ldap/types.rs b/rust/src/ldap/types.rs index 7b79a32e01..901201b4a3 100644 --- a/rust/src/ldap/types.rs +++ b/rust/src/ldap/types.rs @@ -342,7 +342,7 @@ pub struct Control { pub control_value: Option>, } -impl<'a> From> for LdapMessage { +impl From> for LdapMessage { fn from(ldap_msg: ldap_parser::ldap::LdapMessage) -> Self { let message_id = MessageID(ldap_msg.message_id.0); let protocol_op = match ldap_msg.protocol_op { diff --git a/rust/src/smb/nbss_records.rs b/rust/src/smb/nbss_records.rs index 6225eb4706..2fb643fd0c 100644 --- a/rust/src/smb/nbss_records.rs +++ b/rust/src/smb/nbss_records.rs @@ -34,7 +34,7 @@ pub struct NbssRecord<'a> { pub data: &'a[u8], } -impl<'a> NbssRecord<'a> { +impl NbssRecord<'_> { pub fn is_valid(&self) -> bool { let valid = match self.message_type { NBSS_MSGTYPE_SESSION_MESSAGE | diff --git a/rust/src/smb/smb1_records.rs b/rust/src/smb/smb1_records.rs index bf767da8b0..eb42d2c04c 100644 --- a/rust/src/smb/smb1_records.rs +++ b/rust/src/smb/smb1_records.rs @@ -817,7 +817,7 @@ pub struct SmbRecord<'a> { pub data: &'a[u8], } -impl<'a> SmbRecord<'a> { +impl SmbRecord<'_> { pub fn has_unicode_support(&self) -> bool { self.flags2 & 0x8000_u16 != 0 } diff --git a/rust/src/smb/smb2_records.rs b/rust/src/smb/smb2_records.rs index 7de9e6607d..909f08e9e4 100644 --- a/rust/src/smb/smb2_records.rs +++ b/rust/src/smb/smb2_records.rs @@ -60,7 +60,7 @@ pub struct Smb2Record<'a> { pub data: &'a [u8], } -impl<'a> Smb2Record<'a> { +impl Smb2Record<'_> { pub fn is_request(&self) -> bool { self.direction == 0 } diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index 4e1afd0566..c0a121d13a 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -82,7 +82,7 @@ pub struct SNMPTransaction<'a> { tx_data: applayer::AppLayerTxData, } -impl<'a> Transaction for SNMPTransaction<'a> { +impl Transaction for SNMPTransaction<'_> { fn id(&self) -> u64 { self.id } diff --git a/rust/src/ssh/parser.rs b/rust/src/ssh/parser.rs index ea5f9bd288..f3403cf25d 100644 --- a/rust/src/ssh/parser.rs +++ b/rust/src/ssh/parser.rs @@ -167,7 +167,7 @@ pub struct SshPacketKeyExchange<'a> { const SSH_HASSH_STRING_DELIMITER_SLICE: [u8; 1] = [b';']; -impl<'a> SshPacketKeyExchange<'a> { +impl SshPacketKeyExchange<'_> { pub fn generate_hassh( &self, hassh_string: &mut Vec, hassh: &mut Vec, to_server: &bool, ) { diff --git a/rust/src/x509/mod.rs b/rust/src/x509/mod.rs index e7cdbe885c..83f6ae656e 100644 --- a/rust/src/x509/mod.rs +++ b/rust/src/x509/mod.rs @@ -50,7 +50,7 @@ pub struct X509(X509Certificate<'static>); pub struct SCGeneralName<'a>(&'a GeneralName<'a>); -impl<'a> fmt::Display for SCGeneralName<'a> { +impl fmt::Display for SCGeneralName<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self.0 { GeneralName::DNSName(s) => write!(f, "{}", s),