From: Jason Ish Date: Tue, 6 Aug 2024 16:39:30 +0000 (-0600) Subject: rust/http2: remove redundant pattern match X-Git-Tag: suricata-7.0.7~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c92b12e19046fd0f18037a377aa2761dfe531e2;p=thirdparty%2Fsuricata.git rust/http2: remove redundant pattern match Fix clippy lint for if_let_redundant_pattern_matching by using .is_some(). --- diff --git a/rust/src/http2/parser.rs b/rust/src/http2/parser.rs index 158feed709..f185051126 100644 --- a/rust/src/http2/parser.rs +++ b/rust/src/http2/parser.rs @@ -882,7 +882,7 @@ mod tests { match r { Ok((rem, ctx)) => { assert_eq!(ctx.id, HTTP2SettingsId::EnablePush); - if let Some(_) = ctx.value { + if ctx.value.is_some() { panic!("Unexpected value"); } assert_eq!(rem.len(), 0);