Skip to content

Commit 06b8a4d

Browse files
committed
Fix dereference error in closure_performance.rs
- Removed unnecessary dereference operator on line 47 - The closure parameter < /dev/null | b, &param_count| already destructures the reference - Inside the closure, param_count is already an integer value, not a reference - This fixes the compilation error: "type {integer} cannot be dereferenced"
1 parent c40ff37 commit 06b8a4d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

benches/closure_performance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn bench_closure_creation(c: &mut Criterion) {
4444
param_count,
4545
|b, &param_count| {
4646
b.iter(|| {
47-
let params = (0..*param_count).map(|i| format!("param_{}", i)).collect();
47+
let params = (0..param_count).map(|i| format!("param_{}", i)).collect();
4848
let closure =
4949
create_closure_heap("test_closure".to_string(), params, vec![], false);
5050
black_box(closure);

0 commit comments

Comments
 (0)