diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2018-06-20 07:57:22 -0400 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2018-08-02 18:57:24 -0400 |
| commit | 97ab37e2dcd85ec42f5b90495340322a16c09102 (patch) | |
| tree | 00ff1fe06b0e1c73af85adb770bc63bfab415683 | |
| parent | 256a6e4fa97b3f4261265c89a29a68c4c5ccb618 (diff) | |
| download | rust-97ab37e2dcd85ec42f5b90495340322a16c09102.tar.gz rust-97ab37e2dcd85ec42f5b90495340322a16c09102.zip | |
Remove some dead code
| -rw-r--r-- | src/librustc/util/profiling.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/librustc/util/profiling.rs b/src/librustc/util/profiling.rs index 6bdc17a74ba..951c5277d0d 100644 --- a/src/librustc/util/profiling.rs +++ b/src/librustc/util/profiling.rs @@ -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) - } -} \ No newline at end of file +} |
