Skip to content

Commit

Permalink
refactor: change FnOnce to Fn in interval tree test
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds committed Mar 11, 2024
1 parent 062f997 commit 7579e18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/utils/src/interval_map/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ impl<V> IntervalMap<i32, V> {
}
}

fn with_map_and_generator<V>(test_fn: impl FnOnce(IntervalMap<i32, V>, IntervalGenerator) + Clone) {
fn with_map_and_generator<V>(test_fn: impl Fn(IntervalMap<i32, V>, 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);
}
}

Expand Down

0 comments on commit 7579e18

Please sign in to comment.