Remove trailing commas in macros

This is going to become a hard error in future releases of the compiler.
This commit is contained in:
Thibaut Vandervelden 2021-08-19 12:07:56 +02:00
parent 5c36964d13
commit 8ce629257a
2 changed files with 6 additions and 6 deletions

View File

@ -1,13 +1,13 @@
#[cfg(feature = "log")]
macro_rules! net_log {
(trace, $($arg:expr),*) => { log::trace!($($arg),*); };
(debug, $($arg:expr),*) => { log::debug!($($arg),*); };
(trace, $($arg:expr),*) => { log::trace!($($arg),*) };
(debug, $($arg:expr),*) => { log::debug!($($arg),*) };
}
#[cfg(feature = "defmt")]
macro_rules! net_log {
(trace, $($arg:expr),*) => { defmt::trace!($($arg),*); };
(debug, $($arg:expr),*) => { defmt::debug!($($arg),*); };
(trace, $($arg:expr),*) => { defmt::trace!($($arg),*) };
(debug, $($arg:expr),*) => { defmt::debug!($($arg),*) };
}
#[cfg(not(any(feature = "log", feature = "defmt")))]

View File

@ -103,10 +103,10 @@ pub enum Socket<'a> {
macro_rules! dispatch_socket {
($self_:expr, |$socket:ident| $code:expr) => {
dispatch_socket!(@inner $self_, |$socket| $code);
dispatch_socket!(@inner $self_, |$socket| $code)
};
(mut $self_:expr, |$socket:ident| $code:expr) => {
dispatch_socket!(@inner mut $self_, |$socket| $code);
dispatch_socket!(@inner mut $self_, |$socket| $code)
};
(@inner $( $mut_:ident )* $self_:expr, |$socket:ident| $code:expr) => {
match $self_ {