@@ -57,45 +57,31 @@ pub fn handle_environment_creation(
5757    let  mut  progress = ProgressReporter :: new ( user_output. clone ( ) ,  3 ) ; 
5858
5959    // Step 1: Load configuration 
60-     progress
61-         . start_step ( "Loading configuration" ) 
62-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
60+     progress. start_step ( "Loading configuration" ) ?; 
6361    let  config = load_configuration ( progress. output ( ) ,  env_file) ?; 
64-     progress
65-         . complete_step ( Some ( & format ! ( 
66-             "Configuration loaded: {}" , 
67-             config. environment. name
68-         ) ) ) 
69-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
62+     progress. complete_step ( Some ( & format ! ( 
63+         "Configuration loaded: {}" , 
64+         config. environment. name
65+     ) ) ) ?; 
7066
7167    // Step 2: Initialize dependencies 
72-     progress
73-         . start_step ( "Initializing dependencies" ) 
74-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
68+     progress. start_step ( "Initializing dependencies" ) ?; 
7569    let  command_handler = factory. create_create_handler ( & ctx) ; 
76-     progress
77-         . complete_step ( None ) 
78-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
70+     progress. complete_step ( None ) ?; 
7971
8072    // Step 3: Execute create command (provision infrastructure) 
81-     progress
82-         . start_step ( "Creating environment" ) 
83-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
73+     progress. start_step ( "Creating environment" ) ?; 
8474    let  environment = execute_create_command ( progress. output ( ) ,  & command_handler,  config) ?; 
85-     progress
86-         . complete_step ( Some ( & format ! ( 
87-             "Instance created: {}" , 
88-             environment. instance_name( ) . as_str( ) 
89-         ) ) ) 
90-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
75+     progress. complete_step ( Some ( & format ! ( 
76+         "Instance created: {}" , 
77+         environment. instance_name( ) . as_str( ) 
78+     ) ) ) ?; 
9179
9280    // Complete with summary 
93-     progress
94-         . complete ( & format ! ( 
95-             "Environment '{}' created successfully" , 
96-             environment. name( ) . as_str( ) 
97-         ) ) 
98-         . map_err ( |e| CreateSubcommandError :: ProgressReportingFailed  {  source :  e } ) ?; 
81+     progress. complete ( & format ! ( 
82+         "Environment '{}' created successfully" , 
83+         environment. name( ) . as_str( ) 
84+     ) ) ?; 
9985
10086    // Display final results 
10187    display_creation_results ( progress. output ( ) ,  & environment) ; 
@@ -131,9 +117,7 @@ fn load_configuration(
131117)  -> Result < EnvironmentCreationConfig ,  CreateSubcommandError >  { 
132118    user_output
133119        . lock ( ) 
134-         . map_err ( |_| CreateSubcommandError :: ProgressReportingFailed  { 
135-             source :  crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned , 
136-         } ) ?
120+         . map_err ( |_| crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned ) ?
137121        . progress ( & format ! ( 
138122            "Loading configuration from '{}'..." , 
139123            env_file. display( ) 
@@ -175,19 +159,15 @@ fn execute_create_command(
175159)  -> Result < Environment ,  CreateSubcommandError >  { 
176160    user_output
177161        . lock ( ) 
178-         . map_err ( |_| CreateSubcommandError :: ProgressReportingFailed  { 
179-             source :  crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned , 
180-         } ) ?
162+         . map_err ( |_| crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned ) ?
181163        . progress ( & format ! ( 
182164            "Creating environment '{}'..." , 
183165            config. environment. name
184166        ) ) ; 
185167
186168    user_output
187169        . lock ( ) 
188-         . map_err ( |_| CreateSubcommandError :: ProgressReportingFailed  { 
189-             source :  crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned , 
190-         } ) ?
170+         . map_err ( |_| crate :: presentation:: progress:: ProgressReporterError :: UserOutputMutexPoisoned ) ?
191171        . progress ( "Validating configuration and creating environment..." ) ; 
192172
193173    #[ allow( clippy:: manual_inspect) ]  
0 commit comments