File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use std::io::Read;
1616use std:: path:: { Path , PathBuf } ;
1717use std:: process:: { self , Command , Stdio } ;
1818use std:: str;
19+ use std:: mem:: ManuallyDrop ;
1920use std:: time:: Duration ;
2021use tempfile:: TempDir ;
2122use tokio:: runtime:: Runtime ;
@@ -1230,7 +1231,8 @@ impl Benchmark {
12301231 }
12311232 }
12321233 log:: debug!( "Benchmark iteration {}/{}" , i + 1 , iterations) ;
1233- let timing_dir = self . make_temp_dir ( prep_dir. path ( ) ) ?;
1234+ // Don't delete the directory on error.
1235+ let timing_dir = ManuallyDrop :: new ( self . make_temp_dir ( prep_dir. path ( ) ) ?) ;
12341236 let cwd = timing_dir. path ( ) ;
12351237
12361238 // A full non-incremental build.
@@ -1282,6 +1284,7 @@ impl Benchmark {
12821284 }
12831285 }
12841286 }
1287+ drop ( ManuallyDrop :: into_inner ( timing_dir) ) ;
12851288 }
12861289 }
12871290
You can’t perform that action at this time.
0 commit comments