Flatten Transparency: iterate the test's groups directly (clippy needless_range_loop)

This commit is contained in:
bflatastic
2026-11-03 16:03:38 +07:00
parent 6b30867eba
commit 47bc3dd58c
+2 -2
View File
@@ -243,8 +243,8 @@ mod tests {
}
let mut out: Vec<Vec<usize>> = vec![];
let mut seen = std::collections::HashMap::new();
for i in 0..n {
let g = *seen.entry(group[i]).or_insert_with(|| {
for (i, &root) in group.iter().enumerate() {
let g = *seen.entry(root).or_insert_with(|| {
out.push(vec![]);
out.len() - 1
});