Skip to content

Commit

Permalink
Remove some dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Aug 2, 2018
1 parent 256a6e4 commit 97ab37e
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/librustc/util/profiling.rs
Expand Up @@ -161,16 +161,6 @@ pub struct SelfProfiler {
current_timer: Instant,
}

pub struct ProfilerActivity<'a>(ProfileCategory, &'a mut SelfProfiler);

impl<'a> Drop for ProfilerActivity<'a> {
fn drop(&mut self) {
let ProfilerActivity (category, profiler) = self;

profiler.end_activity(*category);
}
}

impl SelfProfiler {
pub fn new() -> SelfProfiler {
let mut profiler = SelfProfiler {
Expand Down Expand Up @@ -281,10 +271,4 @@ impl SelfProfiler {

fs::write("self_profiler_results.json", json).unwrap();
}

pub fn record_activity<'a>(&'a mut self, category: ProfileCategory) -> ProfilerActivity<'a> {
self.start_activity(category);

ProfilerActivity(category, self)
}
}
}

0 comments on commit 97ab37e

Please sign in to comment.