mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
Suppress unused_valiables
lint in non-debug builds
This commit is contained in:
parent
d210b9fced
commit
f931c3d1e4
1 changed files with 19 additions and 3 deletions
|
@ -740,15 +740,31 @@ mod debug_macros {
|
|||
mod debug_macros {
|
||||
macro_rules! debugln {
|
||||
($fmt:expr) => {};
|
||||
($fmt:expr, $($arg:tt)*) => {};
|
||||
($fmt:expr, $($arg:tt)*) => { ignore_fmt_args!($($arg)*); };
|
||||
}
|
||||
macro_rules! sdebugln {
|
||||
($fmt:expr) => {};
|
||||
($fmt:expr, $($arg:tt)*) => {};
|
||||
($fmt:expr, $($arg:tt)*) => { ignore_fmt_args!($($arg)*); };
|
||||
}
|
||||
macro_rules! debug {
|
||||
($fmt:expr) => {};
|
||||
($fmt:expr, $($arg:tt)*) => {};
|
||||
($fmt:expr, $($arg:tt)*) => { ignore_fmt_args!($($arg)*); };
|
||||
}
|
||||
|
||||
macro_rules! ignore_fmt_args {
|
||||
() => {};
|
||||
|
||||
// name = expr
|
||||
($name:ident = $val:expr $( , $($ts:tt)* )?) => {
|
||||
let _ = $val;
|
||||
ignore_fmt_args!($($($ts)*)*);
|
||||
};
|
||||
|
||||
// expr
|
||||
($val:expr $( , $($ts:tt)* )?) => {
|
||||
let _ = $val;
|
||||
ignore_fmt_args!($($($ts)*)*);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue