From: Philippe Antoine Date: Tue, 7 Sep 2021 12:44:25 +0000 (+0200) Subject: http2: better rust lifetimes X-Git-Tag: suricata-7.0.0-beta1~1355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56fae072b225d1c175116efe117c264afbdbf4a3;p=thirdparty%2Fsuricata.git http2: better rust lifetimes so that borrow check gets happy --- 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);