fix(clippy): collapse nested if-let in build_graph (collapsible_if)
This commit is contained in:
parent
0af14d8ef8
commit
4d76305f2f
1 changed files with 4 additions and 4 deletions
|
|
@ -190,10 +190,10 @@ fn build_graph(
|
|||
}
|
||||
// Add parent→child edges.
|
||||
for (name, parent_opt) in topo {
|
||||
if let Some(parent) = parent_opt {
|
||||
if let (Some(&p_idx), Some(&c_idx)) = (idx.get(parent), idx.get(name.as_str())) {
|
||||
graph.add_edge(p_idx, c_idx, ());
|
||||
}
|
||||
if let Some(parent) = parent_opt
|
||||
&& let (Some(&p_idx), Some(&c_idx)) = (idx.get(parent), idx.get(name.as_str()))
|
||||
{
|
||||
graph.add_edge(p_idx, c_idx, ());
|
||||
}
|
||||
}
|
||||
(graph, idx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue