pgsql/parser: fix type complexity clippy warning

Cf https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
pull/12625/head
Juliana Fajardini 1 year ago committed by Victor Julien
parent a4ce9cfe15
commit ae00181736

@ -346,6 +346,8 @@ impl SASLAuthenticationMechanism {
} }
} }
type SASLInitialResponse = (SASLAuthenticationMechanism, u32, Vec<u8>);
#[derive(Debug, PartialEq, Eq)] #[derive(Debug, PartialEq, Eq)]
pub struct TerminationMessage { pub struct TerminationMessage {
pub identifier: u8, pub identifier: u8,
@ -618,7 +620,7 @@ pub fn pgsql_parse_startup_parameters(
fn parse_sasl_initial_response_payload( fn parse_sasl_initial_response_payload(
i: &[u8], i: &[u8],
) -> IResult<&[u8], (SASLAuthenticationMechanism, u32, Vec<u8>), PgsqlParseError<&[u8]>> { ) -> IResult<&[u8], SASLInitialResponse, PgsqlParseError<&[u8]>> {
let (i, sasl_mechanism) = parse_sasl_mechanism(i)?; let (i, sasl_mechanism) = parse_sasl_mechanism(i)?;
let (i, param_length) = be_u32(i)?; let (i, param_length) = be_u32(i)?;
// From RFC 5802 - the client-first-message will always start w/ // From RFC 5802 - the client-first-message will always start w/

Loading…
Cancel
Save