Restore the loop count that loops_among's refactor dropped

The S3776 split moved the loop-detection body into loops_among without
the 'let n = circ.len()' it reads, so calc failed to compile and the
Sonar build broke. Restore the binding from main.
This commit is contained in:
Dylan M. Taylor
2026-10-26 08:39:58 -04:00
parent 66ed962ad1
commit a6319904d1
+1
View File
@@ -1025,6 +1025,7 @@ impl Calc {
if circ.is_empty() {
return Vec::new();
}
let n = circ.len();
let index: HashMap<Key, usize> = circ.iter().enumerate().map(|(i, k)| (*k, i)).collect();
// Edges from a cell to the `#CIRC!` formulas that read it; loops are the same either way.
let mut deps = Vec::new();