diff --git a/src/templates/fmt.rs.template b/src/templates/fmt.rs.template index 55994c1..5000f59 100644 --- a/src/templates/fmt.rs.template +++ b/src/templates/fmt.rs.template @@ -1,8 +1,5 @@ #![allow(unused)] -#[cfg(all(feature = "defmt", feature = "log"))] -compile_error!("You may not enable both `defmt` and `log` features."); - macro_rules! assert { ($($x:tt)*) => { { @@ -108,11 +105,9 @@ macro_rules! panic { macro_rules! trace { ($s:literal $(, $x:expr)* $(,)?) => { { - #[cfg(feature = "log")] - ::log::trace!($s $(, $x)*); #[cfg(feature = "defmt")] ::defmt::trace!($s $(, $x)*); - #[cfg(not(any(feature = "log", feature="defmt")))] + #[cfg(feature="defmt")] let _ = ($( & $x ),*); } }; @@ -121,11 +116,9 @@ macro_rules! trace { macro_rules! debug { ($s:literal $(, $x:expr)* $(,)?) => { { - #[cfg(feature = "log")] - ::log::debug!($s $(, $x)*); #[cfg(feature = "defmt")] ::defmt::debug!($s $(, $x)*); - #[cfg(not(any(feature = "log", feature="defmt")))] + #[cfg(not(eature="defmt"))] let _ = ($( & $x ),*); } }; @@ -134,11 +127,9 @@ macro_rules! debug { macro_rules! info { ($s:literal $(, $x:expr)* $(,)?) => { { - #[cfg(feature = "log")] - ::log::info!($s $(, $x)*); #[cfg(feature = "defmt")] ::defmt::info!($s $(, $x)*); - #[cfg(not(any(feature = "log", feature="defmt")))] + #[cfg(not(feature="defmt"))] let _ = ($( & $x ),*); } }; @@ -147,11 +138,9 @@ macro_rules! info { macro_rules! _warn { ($s:literal $(, $x:expr)* $(,)?) => { { - #[cfg(feature = "log")] - ::log::warn!($s $(, $x)*); #[cfg(feature = "defmt")] ::defmt::warn!($s $(, $x)*); - #[cfg(not(any(feature = "log", feature="defmt")))] + #[cfg(not(feature="defmt"))] let _ = ($( & $x ),*); } }; @@ -160,11 +149,9 @@ macro_rules! _warn { macro_rules! error { ($s:literal $(, $x:expr)* $(,)?) => { { - #[cfg(feature = "log")] - ::log::error!($s $(, $x)*); #[cfg(feature = "defmt")] ::defmt::error!($s $(, $x)*); - #[cfg(not(any(feature = "log", feature="defmt")))] + #[cfg(not(feature="defmt"))] let _ = ($( & $x ),*); } }; diff --git a/src/templates/rust-toolchain.toml.template b/src/templates/rust-toolchain.toml.template index 297852b..ae4ff90 100644 --- a/src/templates/rust-toolchain.toml.template +++ b/src/templates/rust-toolchain.toml.template @@ -1,8 +1,6 @@ # This file was automatically generated. [toolchain] -channel = "1.77" +channel = "1.80" components = [ "rust-src", "rustfmt" ] -targets = [ - "{target}" -] +targets = ["{target}"]