From 7fbd30b1ae0ce9293302bbf4bfb814f1dc791107 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Thu, 16 Jan 2020 23:15:52 +0100 Subject: don't clone types that are copy found via clippy --- src/libtest/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/libtest') 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 { -- cgit 1.4.1-3-g733a5