about summary refs log tree commit diff
path: root/src/libtest/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtest/lib.rs')
-rw-r--r--src/libtest/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 45669d120c7..4c4d7958243 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -485,9 +485,7 @@ pub fn run_test(
         }
         StaticBenchFn(benchfn) => {
             // Benchmarks aren't expected to panic, so we run them all in-process.
-            crate::bench::benchmark(desc, monitor_ch, opts.nocapture, |harness| {
-                (benchfn.clone())(harness)
-            });
+            crate::bench::benchmark(desc, monitor_ch, opts.nocapture, benchfn);
         }
         DynTestFn(f) => {
             match strategy {