From: Jason Ish Date: Fri, 2 Dec 2022 14:31:58 +0000 (-0600) Subject: rust/http2: fix clippy lint for is_empty() X-Git-Tag: suricata-7.0.0-rc1~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35f99d1af73ab4e9bdaf9f03db67734e7de13015;p=thirdparty%2Fsuricata.git rust/http2: fix clippy lint for is_empty() This snuck through as "cargo clippy" check wasn't finding lints that were fixed by the previous test for fixable lints. --- diff --git a/rust/src/http2/http2.rs b/rust/src/http2/http2.rs index 3a6ffab7ec..ed57ebdda8 100644 --- a/rust/src/http2/http2.rs +++ b/rust/src/http2/http2.rs @@ -958,7 +958,7 @@ impl HTTP2State { tx_same.ft_ts.tx_id = tx_same.tx_id - 1; }; let mut dinput = &rem[..hlsafe]; - if padded && rem.len() > 0 && usize::from(rem[0]) < hlsafe{ + if padded && !rem.is_empty() && usize::from(rem[0]) < hlsafe{ dinput = &rem[1..hlsafe - usize::from(rem[0])]; } match tx_same.decompress(