http2: fix clippy warning about &Vec<u8>

Using &[u8] instead in function prototype

(cherry picked from commit d011b468da)

Conflict fixed by Philippe Antoine
pull/7834/head
Philippe Antoine 4 years ago
parent 275975c699
commit eae0aadab8

@ -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 {

Loading…
Cancel
Save