Explorar el Código

Merge pull request #521 from thibautvdv/remove_trailing_commas

Remove trailing commas in macros
Dario Nieuwenhuis hace 3 años
padre
commit
cb1828cbe6
Se han modificado 2 ficheros con 6 adiciones y 6 borrados
  1. 4 4
      src/macros.rs
  2. 2 2
      src/socket/mod.rs

+ 4 - 4
src/macros.rs

@@ -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")))]

+ 2 - 2
src/socket/mod.rs

@@ -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_ {