mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Fixes
This commit is contained in:
parent
5e498546e8
commit
f22af66c37
1 changed files with 1 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
|||
//! Like `std::time::Instant`, but also measures memory & CPU cycles.
|
||||
use std::{
|
||||
fmt,
|
||||
time::{Duration, Instant},
|
||||
|
@ -76,14 +77,3 @@ impl fmt::Display for StopWatchSpan {
|
|||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
// Unclear if we need this:
|
||||
// https://github.com/jimblandy/perf-event/issues/8
|
||||
impl Drop for StopWatch {
|
||||
fn drop(&mut self) {
|
||||
#[cfg(target_os = "linux")]
|
||||
if let Some(mut counter) = self.counter.take() {
|
||||
let _ = counter.disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue