Skip to content

Commit

Permalink
Allow profiling macro to be unused
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Jan 27, 2023
1 parent 23bd9fb commit efd8bc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ impl DebugLogger {
pub(crate) static NODE_LOGGER: DebugLogger = DebugLogger::new();

#[cfg(feature = "profile")]
#[allow(dead_code)]
macro_rules! time {
($label:expr, $($code:tt)*) => {
let start = ::std::time::Instant::now();
Expand All @@ -118,6 +119,7 @@ macro_rules! time {
}

#[cfg(not(feature = "profile"))]
#[allow(dead_code)]
macro_rules! time {
($label:expr, $($code:tt)*) => {
$($code)*
Expand Down

0 comments on commit efd8bc5

Please sign in to comment.