From 68a4239036524e88f7c23286b2eb9a0f610bda2e Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 22 May 2023 22:11:07 +0200 Subject: [PATCH] Fix --no-default-features (#3015) --- crates/eframe/src/lib.rs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/crates/eframe/src/lib.rs b/crates/eframe/src/lib.rs index 929b7b98..b76c78ea 100644 --- a/crates/eframe/src/lib.rs +++ b/crates/eframe/src/lib.rs @@ -312,27 +312,28 @@ pub type Result = std::result::Result; // --------------------------------------------------------------------------- #[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::*;