Skip to content

Commit

Permalink
Allow log imports to go unused for examples (#108)
Browse files Browse the repository at this point in the history
* allow unused log imports

* allow more unused imports
  • Loading branch information
liamkinne authored Jan 21, 2024
1 parent 4fb9450 commit fd7f03a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/utils/logger.rs
Original file line number Diff line number Diff line change
@@ -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};
}
}
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit fd7f03a

Please sign in to comment.