about summary refs log tree commit diff
path: root/src/libtest/lib.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:15:52 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:48:49 +0100
commit7fbd30b1ae0ce9293302bbf4bfb814f1dc791107 (patch)
tree5499d1a8da34237b9e85748fa9fa5ed903e0e3b4 /src/libtest/lib.rs
parent48840618382eccb8a799320c8e5d08e3b52f4c42 (diff)
downloadrust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.tar.gz
rust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.zip
don't clone types that are copy
found via clippy
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 {