From 35f99d1af73ab4e9bdaf9f03db67734e7de13015 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 2 Dec 2022 08:31:58 -0600 Subject: [PATCH] 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. --- rust/src/http2/http2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(