From 38be58028d81ffe615aff8ae29c296e2d5c79088 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 5 Mar 2026 00:08:06 -0500 Subject: [PATCH] Clean up expand_variables: add HashMap import, use from() constructor Co-Authored-By: Claude Opus 4.6 --- crates/arc-workflows/src/handler/codergen.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/arc-workflows/src/handler/codergen.rs b/crates/arc-workflows/src/handler/codergen.rs index e0e4bc805..aa271358e 100644 --- a/crates/arc-workflows/src/handler/codergen.rs +++ b/crates/arc-workflows/src/handler/codergen.rs @@ -1,3 +1,4 @@ +use std::collections::HashMap; use std::path::Path; use std::sync::Arc; @@ -69,9 +70,7 @@ impl CodergenHandler { /// `$identifier` not in the map produces an error, catching typos like /// `$gaol` at runtime. fn expand_variables(text: &str, graph: &Graph) -> Result { - let mut vars = std::collections::HashMap::new(); - vars.insert("goal".to_string(), graph.goal().to_string()); - + let vars = HashMap::from([("goal".to_string(), graph.goal().to_string())]); crate::cli::run_config::expand_vars(text, &vars).map_err(|e| ArcError::Validation(e.to_string())) }