diff --git a/hive-c0re/src/agent_config/topology.rs b/hive-c0re/src/agent_config/topology.rs index 96e33b38..08acd088 100644 --- a/hive-c0re/src/agent_config/topology.rs +++ b/hive-c0re/src/agent_config/topology.rs @@ -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)