Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/profile/src/stop_watch.rs')
| -rw-r--r-- | crates/profile/src/stop_watch.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/profile/src/stop_watch.rs b/crates/profile/src/stop_watch.rs index 9f3e636ef8..00c37c01d2 100644 --- a/crates/profile/src/stop_watch.rs +++ b/crates/profile/src/stop_watch.rs @@ -37,10 +37,10 @@ impl StopWatch { .build() .map_err(|err| eprintln!("Failed to create perf counter: {err}")) .ok(); - if let Some(counter) = &mut counter { - if let Err(err) = counter.enable() { - eprintln!("Failed to start perf counter: {err}") - } + if let Some(counter) = &mut counter + && let Err(err) = counter.enable() + { + eprintln!("Failed to start perf counter: {err}") } counter } else { |