Skip to content

Commit

Permalink
Optimize debug! code
Browse files Browse the repository at this point in the history
  • Loading branch information
joii2020 committed Oct 29, 2024
1 parent d7d5f9e commit 3c8c22f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,8 @@
/// debug!("hello world");
/// debug!("there is a universal error caused by {}", 42);
/// ```
#[cfg(not(feature = "native-simulator"))]
#[macro_export]
macro_rules! debug {
($fmt:literal) => {
#[cfg(debug_assertions)]
$crate::syscalls::debug(alloc::format!($fmt));
};
($fmt:literal, $($args:expr),+) => {
#[cfg(debug_assertions)]
$crate::syscalls::debug(alloc::format!($fmt, $($args), +));
};
}

#[cfg(feature = "native-simulator")]
#[macro_export]
macro_rules! debug {

($fmt:literal) => {
#[cfg(debug_assertions)]
$crate::syscalls::debug(format!($fmt));
Expand Down

0 comments on commit 3c8c22f

Please sign in to comment.