From 247aa4333135d25b6f4269fe7db7432d14a55510 Mon Sep 17 00:00:00 2001 From: xunilrj Date: Mon, 14 Aug 2023 18:24:47 +0100 Subject: [PATCH] small refactor --- .../src/control_flow_analysis/analyze_return_paths.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sway-core/src/control_flow_analysis/analyze_return_paths.rs b/sway-core/src/control_flow_analysis/analyze_return_paths.rs index bbc4605303e..73c48f0e895 100644 --- a/sway-core/src/control_flow_analysis/analyze_return_paths.rs +++ b/sway-core/src/control_flow_analysis/analyze_return_paths.rs @@ -26,11 +26,10 @@ impl<'cfg> ControlFlowGraph<'cfg> { let mut leaves = vec![]; for ast_entrypoint in module_nodes { match connect_node(engines, ast_entrypoint, &mut graph, &leaves) { - Ok(l_leaves) => { - if let NodeConnection::NextStep(nodes) = l_leaves { - leaves = nodes; - } + Ok(NodeConnection::NextStep(nodes)) => { + leaves = nodes; } + Ok(_) => {} Err(mut e) => { errors.append(&mut e); }