From e7ba7f47a79a2881cf208ef9d944609e8fd4eec9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Jul 2020 03:04:37 +0200 Subject: Profiling tweaks --- crates/ra_prof/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/ra_prof/src') diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs index 89df7f04b..0fb468375 100644 --- a/crates/ra_prof/src/lib.rs +++ b/crates/ra_prof/src/lib.rs @@ -43,6 +43,7 @@ pub struct Scope { } impl Scope { + #[must_use] pub fn enter() -> Scope { let prev = IN_SCOPE.with(|slot| std::mem::replace(&mut *slot.borrow_mut(), true)); Scope { prev } @@ -78,6 +79,7 @@ pub struct CpuProfiler { _private: (), } +#[must_use] pub fn cpu_profiler() -> CpuProfiler { #[cfg(feature = "cpu_profiler")] { -- cgit v1.2.3