From 98ba344d65e665b38b5419faea846bcb26f3ee81 Mon Sep 17 00:00:00 2001 From: Mahmoud-Emad Date: Wed, 22 Oct 2025 11:06:07 +0300 Subject: [PATCH] refactor: Use action_ directly instead of action alias - Access action_ parameters directly - Avoid creating a mutable alias for action_ --- lib/core/playcmds/play_core.v | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/core/playcmds/play_core.v b/lib/core/playcmds/play_core.v index 4f1f6578..16b25bc6 100644 --- a/lib/core/playcmds/play_core.v +++ b/lib/core/playcmds/play_core.v @@ -25,16 +25,15 @@ fn play_core(mut plbook PlayBook) ! { for mut action_ in plbook.find(filter: 'play.*')! { if action_.name == 'include' { - mut action := *action_ - mut toreplace := action.params.get_default('replace', '')! - mut playrunpath := action.params.get_default('path', '')! + mut toreplace := action_.params.get_default('replace', '')! + mut playrunpath := action_.params.get_default('path', '')! if playrunpath.len == 0 { - action.name = 'pull' + action_.name = 'pull' mypath := gittools.path( path: playrunpath - git_url: action.params.get_default('git_url', '')! - git_reset: action.params.get_default_false('git_reset') - git_pull: action.params.get_default_false('git_pull') + git_url: action_.params.get_default('git_url', '')! + git_reset: action_.params.get_default_false('git_reset') + git_pull: action_.params.get_default_false('git_pull') )! playrunpath = mypath.path } @@ -58,7 +57,7 @@ fn play_core(mut plbook PlayBook) ! { included_paths[playrunpath] = true plbook.add(path: playrunpath, replace: toreplacedict)! - action.done = true + action_.done = true } if action_.name == 'echo' { content := action_.params.get_default('content', "didn't find content")!