@@ -1217,10 +1217,10 @@ impl Xtasks {
1217
1217
fn bench ( app_settings : GlobalArgs ) -> Result < ( ) > {
1218
1218
// first of all figure out which branch we're on
1219
1219
// run // git rev-parse --abbrev-ref HEAD
1220
-
1220
+ let workspace_dir = Self :: workspace_dir ( & app_settings ) . unwrap ( ) ;
1221
1221
let command = Command :: new ( "git" )
1222
1222
. args ( [ "rev-parse" , "--abbrev-ref" , "HEAD" ] )
1223
- . current_dir ( Self :: workspace_dir ( & app_settings ) . unwrap ( ) )
1223
+ . current_dir ( workspace_dir)
1224
1224
. output ( )
1225
1225
. with_context ( || "Trying to figure out which branch we're on in benchmarking" ) ?;
1226
1226
let branch = String :: from_utf8 ( command. stdout ) ?;
@@ -1251,7 +1251,7 @@ impl Xtasks {
1251
1251
bencher_cmd
1252
1252
. stdout ( std:: process:: Stdio :: inherit ( ) )
1253
1253
. stderr ( std:: process:: Stdio :: inherit ( ) )
1254
- . current_dir ( Self :: workspace_dir ( & app_settings ) . unwrap ( ) )
1254
+ . current_dir ( workspace_dir)
1255
1255
. arg ( "run" )
1256
1256
. args ( [ "--project" , "bms" ] )
1257
1257
. args ( [ "--branch" , & format ! ( "\" {branch}\" " ) ] )
@@ -1277,7 +1277,9 @@ impl Xtasks {
1277
1277
. args ( [ "--adapter" , "rust_criterion" ] )
1278
1278
. arg ( "cargo bench --features=lua54" ) ;
1279
1279
1280
- let out = bencher_cmd. output ( ) ?;
1280
+ let out = bencher_cmd
1281
+ . output ( )
1282
+ . with_context ( || "Could not trigger bencher command" ) ?;
1281
1283
if !out. status . success ( ) {
1282
1284
bail ! ( "Failed to run bencher: {:?}" , out) ;
1283
1285
}
0 commit comments