From: Juliana Fajardini Date: Tue, 18 Feb 2025 20:17:13 +0000 (-0300) Subject: pgsql/parser: fix type complexity clippy warning X-Git-Tag: suricata-8.0.0-beta1~404 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae0018173637a3db10be303b52e779357e37ce69;p=thirdparty%2Fsuricata.git pgsql/parser: fix type complexity clippy warning Cf https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity --- diff --git a/rust/src/pgsql/parser.rs b/rust/src/pgsql/parser.rs index bd969311d4..0f518c0a93 100644 --- a/rust/src/pgsql/parser.rs +++ b/rust/src/pgsql/parser.rs @@ -346,6 +346,8 @@ impl SASLAuthenticationMechanism { } } +type SASLInitialResponse = (SASLAuthenticationMechanism, u32, Vec); + #[derive(Debug, PartialEq, Eq)] pub struct TerminationMessage { pub identifier: u8, @@ -618,7 +620,7 @@ pub fn pgsql_parse_startup_parameters( fn parse_sasl_initial_response_payload( i: &[u8], -) -> IResult<&[u8], (SASLAuthenticationMechanism, u32, Vec), PgsqlParseError<&[u8]>> { +) -> IResult<&[u8], SASLInitialResponse, PgsqlParseError<&[u8]>> { let (i, sasl_mechanism) = parse_sasl_mechanism(i)?; let (i, param_length) = be_u32(i)?; // From RFC 5802 - the client-first-message will always start w/