fix(clippy): collapse nested if-let in build_graph (collapsible_if)

This commit is contained in:
atlas 2026-07-10 14:58:10 +02:00 committed by mara
commit 4d76305f2f

View file

@ -190,10 +190,10 @@ fn build_graph(
} }
// Add parent→child edges. // Add parent→child edges.
for (name, parent_opt) in topo { for (name, parent_opt) in topo {
if let Some(parent) = parent_opt { if let Some(parent) = parent_opt
if let (Some(&p_idx), Some(&c_idx)) = (idx.get(parent), idx.get(name.as_str())) { && let (Some(&p_idx), Some(&c_idx)) = (idx.get(parent), idx.get(name.as_str()))
graph.add_edge(p_idx, c_idx, ()); {
} graph.add_edge(p_idx, c_idx, ());
} }
} }
(graph, idx) (graph, idx)