diff --git a/src/experiment.rs b/src/experiment.rs index 4a2ecf0..7131fd7 100644 --- a/src/experiment.rs +++ b/src/experiment.rs @@ -35,7 +35,7 @@ impl Experiment { } } -async fn instrument_control(name: &str, future: F) -> T +async fn instrument_control(name: &'static str, future: F) -> T where F: Future, { @@ -47,7 +47,7 @@ where .await } -async fn instrument_experimental(name: &str, future: F) -> T +async fn instrument_experimental(name: &'static str, future: F) -> T where F: Future, { @@ -62,11 +62,10 @@ where .await } -async fn measure_duration(name: &str, kind: &'static str, future: F) -> T +async fn measure_duration(name: &'static str, kind: &'static str, future: F) -> T where F: Future, { - let name = name.to_owned(); let start = Instant::now(); let output = future.await; let duration = start.elapsed();