File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
utils/scarb-execute-utils/src Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,15 @@ pub const EXECUTE_PRINT_OUTPUT_FILENAME: &str = "stdout_output.txt";
1717pub fn incremental_create_execution_output_dir ( path : & Utf8Path ) -> Result < ( Utf8PathBuf , usize ) > {
1818 for i in 1 ..=MAX_ITERATION_COUNT {
1919 let filepath = path. join ( format ! ( "execution{i}" ) ) ;
20- match fs:: create_dir ( & filepath) {
21- Err ( e) if e. kind ( ) == io:: ErrorKind :: AlreadyExists => continue ,
22- Err ( e) => return Err ( e. into ( ) ) ,
23- Ok ( _) => return Ok ( ( filepath, i) ) ,
20+ let result = fs:: create_dir ( & filepath) ;
21+ return match result {
22+ Err ( e) => {
23+ if e. kind ( ) == io:: ErrorKind :: AlreadyExists {
24+ continue ;
25+ }
26+ Err ( e. into ( ) )
27+ }
28+ Ok ( _) => Ok ( ( filepath, i) ) ,
2429 }
2530 }
2631 bail ! ( "failed to create output directory" )
You can’t perform that action at this time.
0 commit comments