Skip to content

Commit 43ca004

Browse files
committed
chore: appease clippy needless_range_loop in correlation grouped accumulator
1 parent b5b6e44 commit 43ca004

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

native/spark-expr/src/agg_funcs/correlation.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ impl GroupsAccumulator for CorrelationGroupsAccumulator {
374374
let n = covar.len();
375375
let mut values = Vec::with_capacity(n);
376376
let mut validity = Vec::with_capacity(n);
377-
for i in 0..n {
378-
let count = counts[i];
377+
for (i, &count) in counts.iter().enumerate().take(n) {
379378
if count == 0.0 {
380379
values.push(0.0);
381380
validity.push(false);

0 commit comments

Comments
 (0)