From: Philippe Antoine Date: Wed, 3 Aug 2022 06:29:40 +0000 (+0200) Subject: http2: fix clippy warning about &Vec X-Git-Tag: suricata-7.0.0-beta1~294 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d011b468da237c2d2e8b704dce9041ba40be5e01;p=thirdparty%2Fsuricata.git http2: fix clippy warning about &Vec Using &[u8] instead in function prototype --- diff --git a/rust/src/http2/decompression.rs b/rust/src/http2/decompression.rs index 7620610c93..40ef9b55d3 100644 --- a/rust/src/http2/decompression.rs +++ b/rust/src/http2/decompression.rs @@ -165,7 +165,7 @@ impl HTTP2DecoderHalf { } } - pub fn http2_encoding_fromvec(&mut self, input: &Vec) { + pub fn http2_encoding_fromvec(&mut self, input: &[u8]) { //use first encoding... if self.encoding == HTTP2ContentEncoding::HTTP2ContentEncodingUnknown { if *input == "gzip".as_bytes().to_vec() { @@ -240,7 +240,7 @@ impl HTTP2Decoder { } } - pub fn http2_encoding_fromvec(&mut self, input: &Vec, dir: Direction) { + pub fn http2_encoding_fromvec(&mut self, input: &[u8], dir: Direction) { if dir == Direction::ToClient { self.decoder_tc.http2_encoding_fromvec(input); } else {