Skip to content

Commit

Permalink
refactor: remove unnecessary iter() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
norskeld committed Mar 2, 2024
1 parent 4b26565 commit 0270d1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/actions/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ impl Executor {
async fn execute_suite(&self, suites: &[ActionSuite]) -> anyhow::Result<()> {
let mut replacements = HashMap::<String, String>::new();

for ActionSuite { name, actions, .. } in suites.iter() {
for ActionSuite { name, actions, .. } in suites {
println!(
"{symbol} {title}: {name}\n",
symbol = style("◆").blue().bold(),
title = style("Running suite").blue(),
name = style(name).green()
);

for action in actions.iter() {
for action in actions {
self.execute_single(action, &mut replacements).await?;
println!();
}
Expand All @@ -45,10 +45,10 @@ impl Executor {
}

async fn execute_flat(&self, actions: &[ActionSingle]) -> anyhow::Result<()> {
let mut injects = HashMap::<String, String>::new();
let mut replacements = HashMap::<String, String>::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!();
}

Expand Down

0 comments on commit 0270d1a

Please sign in to comment.