Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress unused variable warning for debug_print macros #1258

Merged
merged 3 commits into from
May 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 13 additions & 3 deletions crates/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,24 @@ cfg_if::cfg_if! {
#[macro_export]
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_print {
($($arg:tt)*) => ();
($($arg:tt)*) =>
{
{
let _ = || ($(&$arg)*);
}
};
}

#[macro_export]
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_println {
() => ();
($($arg:tt)*) => ();
() => {};
($($arg:tt)*) =>
{
{
let _ = || ($(&$arg)*);
}
};
}
}
}