]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http2: better rust lifetimes 6453/head
authorPhilippe Antoine <contact@catenacyber.fr>
Tue, 7 Sep 2021 12:44:25 +0000 (14:44 +0200)
committerPhilippe Antoine <contact@catenacyber.fr>
Wed, 6 Oct 2021 15:16:08 +0000 (17:16 +0200)
so that borrow check gets happy

(cherry picked from commit 56fae072b225d1c175116efe117c264afbdbf4a3)

rust/src/http2/decompression.rs

index 74637e0f9a73584ceb1e9f603397c4f3c88e5ac3..380fcf3a82de1d1f0335141a813ef36085202942 100644 (file)
@@ -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);