Skip to content

Commit

Permalink
Add explicit seperator
Browse files Browse the repository at this point in the history
  • Loading branch information
athei committed May 17, 2022
1 parent 2f6e061 commit d6c2b1a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions crates/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ cfg_if::cfg_if! {
/// `"pallet-contracts/unstable-interface"` feature to be enabled in the target runtime.
#[macro_export]
macro_rules! debug_print {
($($arg:tt)*) => ($crate::debug_message(&$crate::format!($($arg)*)));
($($arg:tt),*) => ($crate::debug_message(&$crate::format!($($arg0,)*)));
}

/// Appends a formatted string to the `debug_message` buffer, as per [`debug_print`] but
Expand All @@ -144,18 +144,18 @@ cfg_if::cfg_if! {
#[macro_export]
macro_rules! debug_println {
() => ($crate::debug_print!("\n"));
($($arg:tt)*) => (
$crate::debug_print!("{}\n", $crate::format!($($arg)*));
($($arg:tt),*) => (
$crate::debug_print!("{}\n", $crate::format!($($arg),*));
)
}
} else {
#[macro_export]
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_print {
($($arg:tt)*) =>
($($arg:tt),*) =>
{
{
let _ = || ($(&$arg)*);
let _ = || ($(&$arg),*);
}
};
}
Expand All @@ -164,10 +164,10 @@ cfg_if::cfg_if! {
/// Debug messages disabled. Enable the `ink-debug` feature for contract debugging.
macro_rules! debug_println {
() => {};
($($arg:tt)*) =>
($($arg:tt),*) =>
{
{
let _ = || ($(&$arg)*);
let _ = || ($(&$arg),*);
}
};
}
Expand Down

0 comments on commit d6c2b1a

Please sign in to comment.