Merge pull request #521 from thibautvdv/remove_trailing_commas

Remove trailing commas in macros
master
Dario Nieuwenhuis 2021-08-19 14:19:17 +02:00 committed by GitHub
commit c6026c7c1a
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_ {