diff --git a/rust/src/sip/parser.rs b/rust/src/sip/parser.rs index 9c1e926357..d6ed09f882 100644 --- a/rust/src/sip/parser.rs +++ b/rust/src/sip/parser.rs @@ -211,7 +211,12 @@ fn header_value(i: &[u8]) -> IResult<&[u8], &str> { #[inline] fn hcolon(i: &[u8]) -> IResult<&[u8], char> { - delimited(take_while(|c: u8| c.is_space()), char(':'), take_while(|c: u8| c.is_space())).parse(i) + delimited( + take_while(|c: u8| c.is_space()), + char(':'), + take_while(|c: u8| c.is_space()), + ) + .parse(i) } fn message_header(i: &[u8]) -> IResult<&[u8], Header> { diff --git a/rust/src/sip/sip.rs b/rust/src/sip/sip.rs index 520ddabae1..bcec343d0f 100755 --- a/rust/src/sip/sip.rs +++ b/rust/src/sip/sip.rs @@ -157,9 +157,7 @@ impl SIPState { } } - fn parse_request_tcp( - &mut self, flow: *mut Flow, stream_slice: StreamSlice, - ) -> AppLayerResult { + fn parse_request_tcp(&mut self, flow: *mut Flow, stream_slice: StreamSlice) -> AppLayerResult { let input = stream_slice.as_slice(); if input.is_empty() { return AppLayerResult::ok(); @@ -256,9 +254,7 @@ impl SIPState { } } - fn parse_response_tcp( - &mut self, flow: *mut Flow, stream_slice: StreamSlice, - ) -> AppLayerResult { + fn parse_response_tcp(&mut self, flow: *mut Flow, stream_slice: StreamSlice) -> AppLayerResult { let input = stream_slice.as_slice(); if input.is_empty() { return AppLayerResult::ok(); diff --git a/scripts/rustfmt.sh b/scripts/rustfmt.sh index cdf20bb88a..bfc5584de7 100755 --- a/scripts/rustfmt.sh +++ b/scripts/rustfmt.sh @@ -39,4 +39,5 @@ rustfmt --check rust/src/dns/*.rs rust/src/applayertemplate/*.rs rust/src/asn1/* rust/src/rfb/*.rs rust/src/ssh/*.rs rust/src/utils/*.rs rust/src/websocket/*.rs \ rust/src/dhcp/*.rs rust/src/krb/*.rs rust/src/mdns/*.rs rust/src/pop3/*.rs \ rust/src/http2/*.rs rust/src/ike/*.rs rust/src/modbus/*.rs rust/src/mqtt/*.rs \ - rust/src/nfs/*.rs rust/src/pgsql/*.rs rust/src/rdp/*.rs rust/src/sdp/*.rs + rust/src/nfs/*.rs rust/src/pgsql/*.rs rust/src/rdp/*.rs rust/src/sdp/*.rs \ + rust/src/sip/*.rs