]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: fix mismatched_lifetime_syntaxes warning master 13710/head
authorJason Ish <jason.ish@oisf.net>
Thu, 7 Aug 2025 15:21:31 +0000 (09:21 -0600)
committerVictor Julien <victor@inliniac.net>
Thu, 7 Aug 2025 19:12:39 +0000 (21:12 +0200)
Fix new warning present in Rust 1.89.

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/ldap/types.rs:191:30
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths

rust/src/ldap/types.rs

index 08a94667afc65a35f5c2c5d111e16a6501c9a1af..1cbaae1659e72a0f07325e407c0c778063b32de4 100644 (file)
@@ -188,6 +188,6 @@ pub fn ldap_is_response(message: &LdapMessage) -> bool {
     return !ldap_is_request(message);
 }
 
     return !ldap_is_request(message);
 }
 
-pub fn ldap_parse_msg(input: &[u8]) -> ParseResult<LdapMessage, LdapError> {
+pub fn ldap_parse_msg(input: &[u8]) -> ParseResult<'_, LdapMessage<'_>, LdapError> {
     LdapMessage::from_ber(input)
 }
     LdapMessage::from_ber(input)
 }