Skip to content

Commit

Permalink
Don't return environment_build_states_administrator
Browse files Browse the repository at this point in the history
This prepares removing drop suite.

CMK-14884
  • Loading branch information
SoloJacobs committed Oct 24, 2023
1 parent d9469c4 commit 197b98e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions v2/robotmk/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ pub fn build_environments(global_config: &GlobalConfig, suites: Vec<Suite>) -> R
environment_building_stdio_directory(&global_config.working_directory);

let mut suites_to_be_dropped = vec![];
let mut drop_suite;
for suite in suites.iter() {
(environment_build_states_administrator, drop_suite) = build_environment(
let drop_suite = build_environment(
suite,
environment_build_states_administrator,
&mut environment_build_states_administrator,
&env_building_stdio_directory,
)?;

Expand All @@ -45,9 +44,9 @@ pub fn build_environments(global_config: &GlobalConfig, suites: Vec<Suite>) -> R

fn build_environment<'a>(
suite: &'a Suite,
mut environment_build_states_administrator: EnvironmentBuildStatesAdministrator<'a>,
environment_build_states_administrator: &mut EnvironmentBuildStatesAdministrator<'a>,
stdio_directory: &Utf8Path,
) -> Result<(EnvironmentBuildStatesAdministrator<'a>, bool)> {
) -> Result<bool> {
let drop_suite = match suite.environment.build_instructions() {
Some(build_instructions) => {
info!("Building environment for suite {}", suite.name);
Expand All @@ -74,7 +73,7 @@ fn build_environment<'a>(
false
}
};
Ok((environment_build_states_administrator, drop_suite))
Ok(drop_suite)
}

fn run_environment_build(
Expand Down

0 comments on commit 197b98e

Please sign in to comment.