From e5ca0f7abb58497ba63c0e7dfd4d150269946302 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Tue, 7 Sep 2021 14:44:25 +0200 Subject: [PATCH] http2: better rust lifetimes so that borrow check gets happy (cherry picked from commit 56fae072b225d1c175116efe117c264afbdbf4a3) --- 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 74637e0f9a..380fcf3a82 100644 --- a/rust/src/http2/decompression.rs +++ b/rust/src/http2/decompression.rs @@ -187,7 +187,7 @@ impl HTTP2DecoderHalf { } pub fn decompress<'a>( - &'a mut self, input: &'a [u8], output: &'a mut Vec, + &mut self, input: &'a [u8], output: &'a mut Vec, ) -> 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, dir: u8, + &mut self, input: &'a [u8], output: &'a mut Vec, dir: u8, ) -> io::Result<&'a [u8]> { if dir == STREAM_TOCLIENT { return self.decoder_tc.decompress(input, output); -- 2.47.2