Remove some dead code

This commit is contained in:
Wesley Wiser 2018-06-20 07:57:22 -04:00
parent 256a6e4fa9
commit 97ab37e2dc

View file

@ -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 {
@ -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)
}
}
}