Suppress unused variable warnings in net_trace!.

This commit is contained in:
whitequark 2016-12-27 23:52:43 +00:00
parent bba505bc90
commit b409eec11b
1 changed files with 4 additions and 2 deletions

View File

@ -16,9 +16,11 @@ extern crate alloc;
extern crate log;
macro_rules! net_trace {
($($arg:tt)*) => {
($($arg:expr),*) => {
#[cfg(feature = "use_log")]
trace!($($arg)*)
trace!($($arg),*);
#[cfg(not(feature = "use_log"))]
$( let _ = $arg );*; // suppress unused variable warnings
}
}