From dc9da690d20c6fb253c601713447b40280ff57f4 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 15 May 2026 18:19:41 +0200 Subject: [PATCH] nihav_commonfmt: allow validate!() to be unused This suppresses a warning when (e.g. a test environment) imports only decoders that do not use it. --- nihav-commonfmt/src/codecs/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nihav-commonfmt/src/codecs/mod.rs b/nihav-commonfmt/src/codecs/mod.rs index 7064b4b..78823a9 100644 --- a/nihav-commonfmt/src/codecs/mod.rs +++ b/nihav-commonfmt/src/codecs/mod.rs @@ -1,5 +1,6 @@ use nihav_core::codecs::*; +#[allow(unused_macros)] #[cfg(debug_assertions)] macro_rules! validate { ($a:expr) => { if !$a { println!("check failed at {}:{}", file!(), line!()); return Err(DecoderError::InvalidData); } }; -- 2.39.5