]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http2: fix clippy warning about &Vec<u8>
authorPhilippe Antoine <pantoine@oisf.net>
Wed, 3 Aug 2022 06:29:40 +0000 (08:29 +0200)
committerPhilippe Antoine <pantoine@oisf.net>
Wed, 7 Sep 2022 07:23:35 +0000 (09:23 +0200)
Using &[u8] instead in function prototype

(cherry picked from commit d011b468da237c2d2e8b704dce9041ba40be5e01)

Conflict fixed by Philippe Antoine

rust/src/http2/decompression.rs

index 380fcf3a82de1d1f0335141a813ef36085202942..f158785e8732eb063f00c7b4a86f7436ffcaffb8 100644 (file)
@@ -165,7 +165,7 @@ impl HTTP2DecoderHalf {
         }
     }
 
-    pub fn http2_encoding_fromvec(&mut self, input: &Vec<u8>) {
+    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<u8>, dir: u8) {
+    pub fn http2_encoding_fromvec(&mut self, input: &[u8], dir: u8) {
         if dir == STREAM_TOCLIENT {
             self.decoder_tc.http2_encoding_fromvec(input);
         } else {