]> git.nihav.org Git - nihav.git/commitdiff
nihav_commonfmt: allow validate!() to be unused
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 15 May 2026 16:19:41 +0000 (18:19 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 15 May 2026 16:19:41 +0000 (18:19 +0200)
This suppresses a warning when (e.g. a test environment) imports
only decoders that do not use it.

nihav-commonfmt/src/codecs/mod.rs

index 7064b4b401fc59cb43cc0915c1445c7b474bd39d..78823a9d60a2b378cdff3781d66835175eb331f4 100644 (file)
@@ -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); } };