Skip to content

Commit

Permalink
Fix --no-default-features (emilk#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored May 22, 2023
1 parent 86d1d1f commit 68a4239
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions crates/eframe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,27 +312,28 @@ pub type Result<T> = std::result::Result<T, Error>;
// ---------------------------------------------------------------------------

#[cfg(not(target_arch = "wasm32"))]
#[cfg(any(feature = "glow", feature = "wgpu"))]
mod profiling_scopes {
#![allow(unused_macros)]
#![allow(unused_imports)]

/// Profiling macro for feature "puffin"
macro_rules! profile_function {
($($arg: tt)*) => {
#[cfg(feature = "puffin")]
puffin::profile_function!($($arg)*);
};
}
($($arg: tt)*) => {
#[cfg(feature = "puffin")]
puffin::profile_function!($($arg)*);
};
}
pub(crate) use profile_function;

/// Profiling macro for feature "puffin"
macro_rules! profile_scope {
($($arg: tt)*) => {
#[cfg(feature = "puffin")]
puffin::profile_scope!($($arg)*);
};
}
($($arg: tt)*) => {
#[cfg(feature = "puffin")]
puffin::profile_scope!($($arg)*);
};
}
pub(crate) use profile_scope;
}

#[cfg(not(target_arch = "wasm32"))]
#[cfg(any(feature = "glow", feature = "wgpu"))]
pub(crate) use profiling_scopes::*;

0 comments on commit 68a4239

Please sign in to comment.