From 7579e18d3f18580e8d1227cafe539eb226a6c342 Mon Sep 17 00:00:00 2001 From: bsbds <69835502+bsbds@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:49:26 +0800 Subject: [PATCH] refactor: change FnOnce to Fn in interval tree test Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com> --- crates/utils/src/interval_map/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/utils/src/interval_map/tests.rs b/crates/utils/src/interval_map/tests.rs index b416ac898..bd159cfff 100644 --- a/crates/utils/src/interval_map/tests.rs +++ b/crates/utils/src/interval_map/tests.rs @@ -98,12 +98,12 @@ impl IntervalMap { } } -fn with_map_and_generator(test_fn: impl FnOnce(IntervalMap, IntervalGenerator) + Clone) { +fn with_map_and_generator(test_fn: impl Fn(IntervalMap, IntervalGenerator)) { let seeds = vec![[0; 32], [1; 32], [2; 32]]; for seed in seeds { let gen = IntervalGenerator::new(seed); let map = IntervalMap::new(); - test_fn.clone()(map, gen); + test_fn(map, gen); } }