Просмотр исходного кода

Remove trailing commas in macros

This is going to become a hard error in future releases of the compiler.
Thibaut Vandervelden 3 лет назад
Родитель
Сommit
53a7da3bfc
2 измененных файлов с 6 добавлено и 6 удалено
  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_ {