diff --git a/profiling/examples/simple.rs b/profiling/examples/simple.rs index 75715af..a88b7e7 100644 --- a/profiling/examples/simple.rs +++ b/profiling/examples/simple.rs @@ -50,10 +50,7 @@ fn some_other_function(iterations: usize) { burn_time(5); { - // Make this a non-literal to touch more of the API. It still has to be 'static scope though - // for multiple of the backends - let scope_name = "do_iterations"; - profiling::scope!(scope_name); + profiling::scope!("do_iterations"); for i in 0..iterations { profiling::scope!( "some_inner_function_that_sleeps", diff --git a/profiling/src/type_check_impl.rs b/profiling/src/type_check_impl.rs index fb3368e..7c01259 100644 --- a/profiling/src/type_check_impl.rs +++ b/profiling/src/type_check_impl.rs @@ -2,10 +2,10 @@ #[macro_export] macro_rules! scope { - ($name:expr) => { + ($name:literal) => { let _: &str = $name; }; - ($name:expr, $data:expr) => { + ($name:literal, $data:expr) => { let _: &str = $name; let _: &str = $data; };