Skip to content

Commit ce475f4

Browse files
committed
fix(bench): resolve borrow-after-move error in bench_throughput
- Changed iteration over operation_counts to use a reference (&operation_counts) - This prevents moving the HashMap while still needing to access its length - Fixes compilation error E0382
1 parent 079fda8 commit ce475f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/bench_throughput.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ fn gather_operation_metrics(
395395

396396
// Create metrics based on detected operations
397397
// Note: This is a simplified approach. Full instrumentation would require library changes.
398-
for (op_name, count) in operation_counts {
398+
for (op_name, count) in &operation_counts {
399399
metrics.push(OperationMetric {
400400
operation_name: op_name.clone(),
401401
total_time: total_time / operation_counts.len() as u32, // Simplified distribution

0 commit comments

Comments
 (0)