Skip to content

Commit

Permalink
Make counter name a String
Browse files Browse the repository at this point in the history
  • Loading branch information
caizixian committed May 19, 2021
1 parent b41759a commit e92c562
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scheduler/work_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub(super) trait WorkCounter: WorkCounterClone {
// TODO: consolidate with crate::util::statistics::counter::Counter;
fn start(&mut self);
fn stop(&mut self);
fn name(&self) -> &'static str;
fn name(&self) -> String;
fn get_base(&self) -> &WorkCounterBase;
fn get_base_mut(&mut self) -> &mut WorkCounterBase;
}
Expand Down Expand Up @@ -91,8 +91,8 @@ impl WorkCounter for WorkDuration {
self.base.merge_val(duration);
}

fn name(&self) -> &'static str {
"time"
fn name(&self) -> String {
"time".to_owned()
}

fn get_base(&self) -> &WorkCounterBase {
Expand Down

0 comments on commit e92c562

Please sign in to comment.