From: Kostya Shishkov Date: Fri, 15 May 2026 16:19:41 +0000 (+0200) Subject: nihav_commonfmt: allow validate!() to be unused X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=dc9da690d20c6fb253c601713447b40280ff57f4;p=nihav.git 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. --- 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); } };