diff --git a/src/runner.rs b/src/runner.rs index 7aedbad..8c79c82 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -168,7 +168,7 @@ fn render_data_test(desc: &DataTestDesc, rendered: &mut Vec) { }; let testfn = match case.case { - DataTestFn::TestFn(testfn) => TestFn::DynTestFn(testfn), + DataTestFn::TestFn(testfn) => TestFn::DynTestFn(Box::new(|| testfn())), DataTestFn::BenchFn(benchfn) => TestFn::DynBenchFn(benchfn), };