@@ -501,8 +501,7 @@ impl Config {
501
501
}
502
502
}
503
503
504
- let repo_access: Box < dyn RustRepositoryAccessor > ;
505
- repo_access = match args. access . as_deref ( ) {
504
+ let repo_access: Box < dyn RustRepositoryAccessor > = match args. access . as_deref ( ) {
506
505
None | Some ( "checkout" ) => Box :: new ( AccessViaLocalGit ) ,
507
506
Some ( "github" ) => Box :: new ( AccessViaGithub ) ,
508
507
Some ( other) => bail ! ( "unknown access argument: {}" , other) ,
@@ -606,10 +605,10 @@ fn install(cfg: &Config, client: &Client, bound: &Bound) -> Result<(), Error> {
606
605
// bisection entry point
607
606
fn bisect ( cfg : & Config , client : & Client ) -> Result < ( ) , Error > {
608
607
if cfg. is_commit {
609
- let bisection_result = bisect_ci ( & cfg, & client) ?;
608
+ let bisection_result = bisect_ci ( cfg, client) ?;
610
609
print_results ( cfg, client, & bisection_result) ;
611
610
} else {
612
- let nightly_bisection_result = bisect_nightlies ( & cfg, & client) ?;
611
+ let nightly_bisection_result = bisect_nightlies ( cfg, client) ?;
613
612
print_results ( cfg, client, & nightly_bisection_result) ;
614
613
let nightly_regression = & nightly_bisection_result. searched [ nightly_bisection_result. found ] ;
615
614
@@ -675,18 +674,18 @@ fn print_results(cfg: &Config, client: &Client, bisection_result: &BisectionResu
675
674
676
675
if toolchains[ * found] == * toolchains. last ( ) . unwrap ( ) {
677
676
let t = & toolchains[ * found] ;
678
- let r = match t. install ( & client, & dl_spec) {
677
+ let r = match t. install ( client, dl_spec) {
679
678
Ok ( ( ) ) => {
680
- let outcome = t. test ( & cfg) ;
681
- remove_toolchain ( cfg, t, & dl_spec) ;
679
+ let outcome = t. test ( cfg) ;
680
+ remove_toolchain ( cfg, t, dl_spec) ;
682
681
// we want to fail, so a successful build doesn't satisfy us
683
682
match outcome {
684
683
TestOutcome :: Baseline => Satisfies :: No ,
685
684
TestOutcome :: Regressed => Satisfies :: Yes ,
686
685
}
687
686
}
688
687
Err ( _) => {
689
- let _ = t. remove ( & dl_spec) ;
688
+ let _ = t. remove ( dl_spec) ;
690
689
Satisfies :: Unknown
691
690
}
692
691
} ;
@@ -899,21 +898,21 @@ fn install_and_test(
899
898
client : & Client ,
900
899
dl_spec : & DownloadParams ,
901
900
) -> Result < Satisfies , InstallError > {
902
- match t. install ( & client, & dl_spec) {
901
+ match t. install ( client, dl_spec) {
903
902
Ok ( ( ) ) => {
904
- let outcome = t. test ( & cfg) ;
903
+ let outcome = t. test ( cfg) ;
905
904
// we want to fail, so a successful build doesn't satisfy us
906
905
let r = match outcome {
907
906
TestOutcome :: Baseline => Satisfies :: No ,
908
907
TestOutcome :: Regressed => Satisfies :: Yes ,
909
908
} ;
910
909
eprintln ! ( "RESULT: {}, ===> {}" , t, r) ;
911
- remove_toolchain ( cfg, t, & dl_spec) ;
910
+ remove_toolchain ( cfg, t, dl_spec) ;
912
911
eprintln ! ( ) ;
913
912
Ok ( r)
914
913
}
915
914
Err ( error) => {
916
- remove_toolchain ( cfg, t, & dl_spec) ;
915
+ remove_toolchain ( cfg, t, dl_spec) ;
917
916
Err ( error)
918
917
}
919
918
}
@@ -925,8 +924,8 @@ fn bisect_to_regression(
925
924
client : & Client ,
926
925
dl_spec : & DownloadParams ,
927
926
) -> usize {
928
- least_satisfying ( & toolchains, |t| {
929
- match install_and_test ( & t, & cfg, & client, & dl_spec) {
927
+ least_satisfying ( toolchains, |t| {
928
+ match install_and_test ( t, cfg, client, dl_spec) {
930
929
Ok ( r) => r,
931
930
Err ( _) => Satisfies :: Unknown ,
932
931
}
@@ -962,7 +961,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
962
961
bail ! ( "cannot bisect nightlies with --alt: not supported" ) ;
963
962
}
964
963
965
- let dl_spec = DownloadParams :: for_nightly ( & cfg) ;
964
+ let dl_spec = DownloadParams :: for_nightly ( cfg) ;
966
965
967
966
// before this date we didn't have -std packages
968
967
let end_at = chrono:: Date :: from_utc (
@@ -1015,7 +1014,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
1015
1014
) ;
1016
1015
}
1017
1016
1018
- match install_and_test ( & t, & cfg, & client, & dl_spec) {
1017
+ match install_and_test ( & t, cfg, client, & dl_spec) {
1019
1018
Ok ( r) => {
1020
1019
// If Satisfies::No, then the regression was not identified in this nightly.
1021
1020
// Break out of the loop and use this as the start date for the
@@ -1064,7 +1063,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
1064
1063
t_end. std_targets . sort ( ) ;
1065
1064
t_end. std_targets . dedup ( ) ;
1066
1065
1067
- match install_and_test ( & t_end, & cfg, & client, & dl_spec) {
1066
+ match install_and_test ( & t_end, cfg, client, & dl_spec) {
1068
1067
Ok ( r) => {
1069
1068
// If Satisfies::No, then the regression was not identified in this nightly.
1070
1069
// this is an error, abort with error message
@@ -1086,7 +1085,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
1086
1085
ToolchainSpec :: Nightly { date : last_failure } ,
1087
1086
) ;
1088
1087
1089
- let found = bisect_to_regression ( & toolchains, & cfg, client, & dl_spec) ;
1088
+ let found = bisect_to_regression ( & toolchains, cfg, client, & dl_spec) ;
1090
1089
1091
1090
Ok ( BisectionResult {
1092
1091
dl_spec,
@@ -1172,7 +1171,7 @@ fn bisect_ci_via(
1172
1171
)
1173
1172
}
1174
1173
1175
- bisect_ci_in_commits ( cfg, client, & start_sha, & end_sha, commits)
1174
+ bisect_ci_in_commits ( cfg, client, start_sha, & end_sha, commits)
1176
1175
}
1177
1176
1178
1177
fn bisect_ci_in_commits (
@@ -1194,7 +1193,7 @@ fn bisect_ci_in_commits(
1194
1193
) ;
1195
1194
}
1196
1195
1197
- if let Some ( ref c) = commits. last ( ) {
1196
+ if let Some ( c) = commits. last ( ) {
1198
1197
if end != "origin/master" && !c. sha . starts_with ( end) {
1199
1198
bail ! ( "expected to end with {}, but ended with {}" , end, c. sha) ;
1200
1199
}
@@ -1222,7 +1221,7 @@ fn bisect_ci_in_commits(
1222
1221
1223
1222
if !toolchains. is_empty ( ) {
1224
1223
// validate commit at start of range
1225
- match install_and_test ( & toolchains[ 0 ] , & cfg, & client, & dl_spec) {
1224
+ match install_and_test ( & toolchains[ 0 ] , cfg, client, & dl_spec) {
1226
1225
Ok ( r) => {
1227
1226
// If Satisfies::Yes, then the commit at the beginning of the range
1228
1227
// has the regression, this is an error
@@ -1237,7 +1236,7 @@ fn bisect_ci_in_commits(
1237
1236
}
1238
1237
1239
1238
// validate commit at end of range
1240
- match install_and_test ( & toolchains[ toolchains. len ( ) - 1 ] , & cfg, & client, & dl_spec) {
1239
+ match install_and_test ( & toolchains[ toolchains. len ( ) - 1 ] , cfg, client, & dl_spec) {
1241
1240
Ok ( r) => {
1242
1241
// If Satisfies::No, then the regression was not identified at the end of the
1243
1242
// commit range, this is an error
@@ -1252,7 +1251,7 @@ fn bisect_ci_in_commits(
1252
1251
}
1253
1252
}
1254
1253
1255
- let found = bisect_to_regression ( & toolchains, & cfg, client, & dl_spec) ;
1254
+ let found = bisect_to_regression ( & toolchains, cfg, client, & dl_spec) ;
1256
1255
1257
1256
Ok ( BisectionResult {
1258
1257
searched : toolchains,
0 commit comments