From 0270d1ab7eea6989b82828d7ea03f7d1016b084b Mon Sep 17 00:00:00 2001 From: Vladislav Mamon Date: Sun, 3 Mar 2024 02:48:22 +0300 Subject: [PATCH] refactor: remove unnecessary `iter()` calls --- src/actions/executor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/actions/executor.rs b/src/actions/executor.rs index 23b99d8..d4fc23a 100644 --- a/src/actions/executor.rs +++ b/src/actions/executor.rs @@ -27,7 +27,7 @@ impl Executor { async fn execute_suite(&self, suites: &[ActionSuite]) -> anyhow::Result<()> { let mut replacements = HashMap::::new(); - for ActionSuite { name, actions, .. } in suites.iter() { + for ActionSuite { name, actions, .. } in suites { println!( "{symbol} {title}: {name}\n", symbol = style("◆").blue().bold(), @@ -35,7 +35,7 @@ impl Executor { name = style(name).green() ); - for action in actions.iter() { + for action in actions { self.execute_single(action, &mut replacements).await?; println!(); } @@ -45,10 +45,10 @@ impl Executor { } async fn execute_flat(&self, actions: &[ActionSingle]) -> anyhow::Result<()> { - let mut injects = HashMap::::new(); + let mut replacements = HashMap::::new(); - for action in actions.iter() { - self.execute_single(action, &mut injects).await?; + for action in actions { + self.execute_single(action, &mut replacements).await?; println!(); }