Skip to content

Commit 86fdf49

Browse files
committed
Make counter name a String
1 parent 0ee06ed commit 86fdf49

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scheduler/work_counter.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub(super) trait WorkCounter: WorkCounterClone {
2121
// TODO: consolidate with crate::util::statistics::counter::Counter;
2222
fn start(&mut self);
2323
fn stop(&mut self);
24-
fn name(&self) -> &'static str;
24+
fn name(&self) -> String;
2525
fn get_base(&self) -> &WorkCounterBase;
2626
fn get_base_mut(&mut self) -> &mut WorkCounterBase;
2727
}
@@ -91,8 +91,8 @@ impl WorkCounter for WorkDuration {
9191
self.base.merge_val(duration);
9292
}
9393

94-
fn name(&self) -> &'static str {
95-
"time"
94+
fn name(&self) -> String {
95+
"time".to_owned()
9696
}
9797

9898
fn get_base(&self) -> &WorkCounterBase {

0 commit comments

Comments
 (0)