Skip to content

Commit

Permalink
bump to 1.80 and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Jul 27, 2024
1 parent dd9001c commit f2742ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
23 changes: 5 additions & 18 deletions src/templates/fmt.rs.template
Original file line number Diff line number Diff line change
@@ -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)*) => {
{
Expand Down Expand Up @@ -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 ),*);
}
};
Expand All @@ -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 ),*);
}
};
Expand All @@ -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 ),*);
}
};
Expand All @@ -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 ),*);
}
};
Expand All @@ -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 ),*);
}
};
Expand Down
6 changes: 2 additions & 4 deletions src/templates/rust-toolchain.toml.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This file was automatically generated.

[toolchain]
channel = "1.77"
channel = "1.80"
components = [ "rust-src", "rustfmt" ]
targets = [
"{target}"
]
targets = ["{target}"]

0 comments on commit f2742ae

Please sign in to comment.