http2: better rust lifetimes

so that borrow check gets happy
pull/6409/head
Philippe Antoine 4 years ago
parent a1f9e0c97a
commit 56fae072b2

@ -187,7 +187,7 @@ impl HTTP2DecoderHalf {
}
pub fn decompress<'a>(
&'a mut self, input: &'a [u8], output: &'a mut Vec<u8>,
&mut self, input: &'a [u8], output: &'a mut Vec<u8>,
) -> io::Result<&'a [u8]> {
match self.decoder {
HTTP2Decompresser::GZIP(ref mut gzip_decoder) => {
@ -249,7 +249,7 @@ impl HTTP2Decoder {
}
pub fn decompress<'a>(
&'a mut self, input: &'a [u8], output: &'a mut Vec<u8>, dir: u8,
&mut self, input: &'a [u8], output: &'a mut Vec<u8>, dir: u8,
) -> io::Result<&'a [u8]> {
if dir == STREAM_TOCLIENT {
return self.decoder_tc.decompress(input, output);

Loading…
Cancel
Save