From 9aed552c491aaabc84e3141bc70e4d26c03efa85 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 9 Dec 2025 22:43:40 +0000 Subject: fixed warnings/lints --- src/log.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/log.rs') diff --git a/src/log.rs b/src/log.rs index d25d210..5b67001 100644 --- a/src/log.rs +++ b/src/log.rs @@ -32,6 +32,7 @@ pub trait Format {} pub use defmt::Debug2Format; // For tracing or no logging, Debug2Format is a passthrough +#[allow(non_snake_case)] #[cfg(not(feature = "defmt"))] #[inline] pub fn Debug2Format(value: &T) -> &T { @@ -51,7 +52,7 @@ macro_rules! trace { tracing::trace!($($arg)*); #[cfg(not(any(feature = "defmt", feature = "tracing")))] - { let _ = (); } // no-op + { let _ = format_args!($($arg)*); } // no-op, format_args! borrows without moving }; } @@ -65,7 +66,7 @@ macro_rules! debug { tracing::debug!($($arg)*); #[cfg(not(any(feature = "defmt", feature = "tracing")))] - { let _ = (); } // no-op + { let _ = format_args!($($arg)*); } // no-op, format_args! borrows without moving }; } @@ -79,7 +80,7 @@ macro_rules! info { tracing::info!($($arg)*); #[cfg(not(any(feature = "defmt", feature = "tracing")))] - { let _ = (); } // no-op + { let _ = format_args!($($arg)*); } // no-op, format_args! borrows without moving }; } @@ -93,7 +94,7 @@ macro_rules! warn { tracing::warn!($($arg)*); #[cfg(not(any(feature = "defmt", feature = "tracing")))] - { let _ = (); } // no-op + { let _ = format_args!($($arg)*); } // no-op, format_args! borrows without moving }; } @@ -107,7 +108,7 @@ macro_rules! error { tracing::error!($($arg)*); #[cfg(not(any(feature = "defmt", feature = "tracing")))] - { let _ = (); } // no-op + { let _ = format_args!($($arg)*); } // no-op, format_args! borrows without moving }; } -- cgit