@@ -54,7 +54,7 @@ pub fn handle_environment_creation(
5454
5555 // Step 2: Execute command (create handler before borrowing output)
5656 let command_handler = factory. create_create_handler ( & ctx) ;
57- let environment = execute_create_command ( ctx. output ( ) , command_handler, config) ?;
57+ let environment = execute_create_command ( ctx. output ( ) , & command_handler, config) ?;
5858
5959 // Step 3: Display results
6060 display_creation_results ( ctx. output ( ) , & environment) ;
@@ -120,7 +120,7 @@ fn load_configuration(
120120/// Returns an error if command execution fails (e.g., environment already exists).
121121fn execute_create_command (
122122 output : & mut UserOutput ,
123- command_handler : crate :: application:: command_handlers:: CreateCommandHandler ,
123+ command_handler : & crate :: application:: command_handlers:: CreateCommandHandler ,
124124 config : EnvironmentCreationConfig ,
125125) -> Result < Environment , CreateSubcommandError > {
126126 output. progress ( & format ! (
@@ -444,7 +444,7 @@ mod tests {
444444 let factory = CommandHandlerFactory :: new ( ) ;
445445 let ctx = factory. create_context ( temp_dir. path ( ) . to_path_buf ( ) ) ;
446446 let command_handler = factory. create_create_handler ( & ctx) ;
447- let result = execute_create_command ( & mut output, command_handler, config) ;
447+ let result = execute_create_command ( & mut output, & command_handler, config) ;
448448
449449 assert ! ( result. is_ok( ) , "Should execute command successfully" ) ;
450450 let environment = result. unwrap ( ) ;
@@ -482,12 +482,12 @@ mod tests {
482482
483483 // Create environment first time
484484 let command_handler1 = factory. create_create_handler ( & ctx) ;
485- let result1 = execute_create_command ( & mut output, command_handler1, config. clone ( ) ) ;
485+ let result1 = execute_create_command ( & mut output, & command_handler1, config. clone ( ) ) ;
486486 assert ! ( result1. is_ok( ) , "First execution should succeed" ) ;
487487
488488 // Try to create same environment again
489489 let command_handler2 = factory. create_create_handler ( & ctx) ;
490- let result2 = execute_create_command ( & mut output, command_handler2, config) ;
490+ let result2 = execute_create_command ( & mut output, & command_handler2, config) ;
491491 assert ! ( result2. is_err( ) , "Second execution should fail" ) ;
492492
493493 match result2. unwrap_err ( ) {
@@ -533,7 +533,8 @@ mod tests {
533533 let config = loader. load_from_file ( & config_path) . unwrap ( ) ;
534534 let mut quiet_output = UserOutput :: new ( VerbosityLevel :: Quiet ) ;
535535 let command_handler = factory. create_create_handler ( & ctx) ;
536- let environment = execute_create_command ( & mut quiet_output, command_handler, config) . unwrap ( ) ;
536+ let environment =
537+ execute_create_command ( & mut quiet_output, & command_handler, config) . unwrap ( ) ;
537538
538539 // Test display function with custom output
539540 let stderr_buf = Vec :: new ( ) ;
0 commit comments