]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust/http2: remove redundant pattern match
authorJason Ish <jason.ish@oisf.net>
Tue, 6 Aug 2024 16:39:30 +0000 (10:39 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 7 Aug 2024 06:31:26 +0000 (08:31 +0200)
Fix clippy lint for if_let_redundant_pattern_matching by using
.is_some().

rust/src/http2/parser.rs

index 158feed7098f7370f98de366f49d813ab5310231..f1850511268db76b8f5d22c03fcb8ded582a9a13 100644 (file)
@@ -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);