Fix debug macro warnings

This commit is contained in:
Lachlan Sneff 2018-11-23 00:13:20 -05:00
parent 587fb92de6
commit 6121370656

View File

@ -24,16 +24,8 @@ macro_rules! include_wast2wasm_bytes {
}}; }};
} }
#[cfg(debug_assertions)]
#[macro_export] #[macro_export]
macro_rules! debug { macro_rules! debug {
($fmt:expr) => (println!(concat!("Wasmer::", $fmt))); ($fmt:expr) => (if cfg!(debug_assertions) { println!(concat!("Wasmer::", $fmt)) });
($fmt:expr, $($arg:tt)*) => (println!(concat!("Wasmer::", $fmt, "\n"), $($arg)*)); ($fmt:expr, $($arg:tt)*) => (if cfg!(debug_assertions) { println!(concat!("Wasmer::", $fmt, "\n"), $($arg)*) });
} }
#[cfg(not(debug_assertions))]
#[macro_export]
macro_rules! debug {
($fmt:expr) => {};
($fmt:expr, $($arg:tt)*) => {};
}