Skip to content

Commit

Permalink
Silence warnings about unused profiling macros in egui-winit
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Apr 27, 2022
1 parent 1133f3a commit 8e26676
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions egui-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,19 +663,23 @@ fn translate_cursor(cursor_icon: egui::CursorIcon) -> Option<winit::window::Curs
// ---------------------------------------------------------------------------

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

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

0 comments on commit 8e26676

Please sign in to comment.