mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-07 13:23:22 +00:00
Flatten Transparency: iterate the test's groups directly (clippy needless_range_loop)
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user