From eae0aadab884710ed9cb8f9e0fa3156561d48df0 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Wed, 3 Aug 2022 08:29:40 +0200 Subject: [PATCH] http2: fix clippy warning about &Vec Using &[u8] instead in function prototype (cherry picked from commit d011b468da237c2d2e8b704dce9041ba40be5e01) Conflict fixed by Philippe Antoine --- rust/src/http2/decompression.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/http2/decompression.rs b/rust/src/http2/decompression.rs index 380fcf3a82..f158785e87 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: u8) { + pub fn http2_encoding_fromvec(&mut self, input: &[u8], dir: u8) { if dir == STREAM_TOCLIENT { self.decoder_tc.http2_encoding_fromvec(input); } else {