Skip to content

Commit b7578f8

Browse files
committed
Fix Vector benchmark from_fn issues.
1 parent d2befa1 commit b7578f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

benches/vector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ fn rando<A>() -> impl Iterator<Item = A>
2020
where
2121
Standard: Distribution<A>,
2222
{
23-
let rng = rand::thread_rng();
24-
std::iter::from_fn(|| Some(rng.gen()))
23+
let mut rng = rand::thread_rng();
24+
std::iter::from_fn(move || Some(rng.gen()))
2525
}
2626

2727
fn vector_push_front_mut(b: &mut Bencher, count: usize) {

0 commit comments

Comments
 (0)