From 4d76305f2f52ec67172cbb61d9fa7a9c748032c2 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 10 Jul 2026 14:58:10 +0200 Subject: [PATCH] fix(clippy): collapse nested if-let in build_graph (collapsible_if) --- hive-c0re/src/agent_config/topology.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)