From: Jason Ish Date: Tue, 18 Feb 2025 21:57:22 +0000 (-0600) Subject: rust: allow clippy::unused_unit for tests that use the test macro X-Git-Tag: suricata-7.0.9~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6666555a0920951eb37438dcb21e97061f17edf6;p=thirdparty%2Fsuricata.git rust: allow clippy::unused_unit for tests that use the test macro The cause of the issue comes from the macro, which is provided by a crate. Bust just to allow this for now. --- diff --git a/rust/src/asn1/mod.rs b/rust/src/asn1/mod.rs index 7496d44488..b43d308ab6 100644 --- a/rust/src/asn1/mod.rs +++ b/rust/src/asn1/mod.rs @@ -288,6 +288,7 @@ impl From> for Asn1DecodeError { } #[cfg(test)] +#[allow(clippy::unused_unit)] mod tests { use super::*; use test_case::test_case; diff --git a/rust/src/asn1/parse_rules.rs b/rust/src/asn1/parse_rules.rs index 9a857868db..b324ecf075 100644 --- a/rust/src/asn1/parse_rules.rs +++ b/rust/src/asn1/parse_rules.rs @@ -209,6 +209,7 @@ pub(super) fn asn1_parse_rule(input: &str) -> IResult<&str, DetectAsn1Data> { } #[cfg(test)] +#[allow(clippy::unused_unit)] mod tests { use super::*; use test_case::test_case; diff --git a/rust/src/bittorrent_dht/parser.rs b/rust/src/bittorrent_dht/parser.rs index 545a1ad537..ee0d230947 100644 --- a/rust/src/bittorrent_dht/parser.rs +++ b/rust/src/bittorrent_dht/parser.rs @@ -444,6 +444,7 @@ pub fn parse_bittorrent_dht_packet( } #[cfg(test)] +#[allow(clippy::unused_unit)] mod tests { use super::*; use crate::core::Direction; diff --git a/rust/src/quic/cyu.rs b/rust/src/quic/cyu.rs index 026467816c..44a3143069 100644 --- a/rust/src/quic/cyu.rs +++ b/rust/src/quic/cyu.rs @@ -78,6 +78,7 @@ impl Cyu { } #[cfg(test)] +#[allow(clippy::unused_unit)] mod tests { use super::*; use crate::quic::frames::{Frame, Stream, StreamTag};