diff --git a/examples/utils/logger.rs b/examples/utils/logger.rs index f21f341f..51482bd5 100644 --- a/examples/utils/logger.rs +++ b/examples/utils/logger.rs @@ -1,9 +1,11 @@ #![allow(unsafe_code)] cfg_if::cfg_if! { if #[cfg(all(feature = "log-rtt", feature = "defmt"))] { + #[allow(unused_imports)] pub use defmt::{info, trace, warn, debug, error}; } else { + #[allow(unused_imports)] pub use log::{info, trace, warn, debug, error}; } } @@ -56,7 +58,9 @@ cfg_if::cfg_if! { else if #[cfg(all(feature = "log-rtt"/*, feature = "defmt"*/))] { use defmt_rtt as _; // global logger use panic_probe as _; + #[allow(unused_imports)] pub use defmt::Logger; + #[allow(unused_imports)] pub use defmt::println; #[allow(dead_code)]