File tree 1 file changed +4
-1
lines changed
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;
16
16
use std:: path:: { Path , PathBuf } ;
17
17
use std:: process:: { self , Command , Stdio } ;
18
18
use std:: str;
19
+ use std:: mem:: ManuallyDrop ;
19
20
use std:: time:: Duration ;
20
21
use tempfile:: TempDir ;
21
22
use tokio:: runtime:: Runtime ;
@@ -1230,7 +1231,8 @@ impl Benchmark {
1230
1231
}
1231
1232
}
1232
1233
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 ( ) ) ?) ;
1234
1236
let cwd = timing_dir. path ( ) ;
1235
1237
1236
1238
// A full non-incremental build.
@@ -1282,6 +1284,7 @@ impl Benchmark {
1282
1284
}
1283
1285
}
1284
1286
}
1287
+ drop ( ManuallyDrop :: into_inner ( timing_dir) ) ;
1285
1288
}
1286
1289
}
1287
1290
You can’t perform that action at this time.
0 commit comments