From 5a10fcd2d8320c118eee84c63650c8b18bd80764 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 4 Oct 2022 09:26:37 -0600 Subject: [PATCH] rust: suppress large enum variant lint at location And disable the global lint. --- rust/src/krb/detect.rs | 4 ++++ rust/src/lib.rs | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/src/krb/detect.rs b/rust/src/krb/detect.rs index 7f408088ea..6274c1b37b 100644 --- a/rust/src/krb/detect.rs +++ b/rust/src/krb/detect.rs @@ -97,7 +97,11 @@ impl DetectKrb5TicketEncryptionList { } } + +// Suppress large enum variant lint as the LIST is very large compared +// to the boolean variant. #[derive(Debug)] +#[allow(clippy::large_enum_variant)] pub enum DetectKrb5TicketEncryptionData { WEAK(bool), LIST(DetectKrb5TicketEncryptionList), diff --git a/rust/src/lib.rs b/rust/src/lib.rs index c2556987c3..c315b28d4c 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -45,7 +45,6 @@ #![allow(clippy::field_reassign_with_default)] #![allow(clippy::for_loops_over_fallibles)] #![allow(clippy::if_same_then_else)] -#![allow(clippy::large_enum_variant)] #![allow(clippy::manual_find)] #![allow(clippy::map_flatten)] #![allow(clippy::match_like_matches_macro)]