@@ -272,19 +272,11 @@ impl<'test> TestCx<'test> {
272
272
Ui | MirOpt => false ,
273
273
mode => panic ! ( "unimplemented for mode {:?}" , mode) ,
274
274
} ;
275
- if test_should_run {
276
- self . run_if_enabled ( )
277
- } else {
278
- WillExecute :: No
279
- }
275
+ if test_should_run { self . run_if_enabled ( ) } else { WillExecute :: No }
280
276
}
281
277
282
278
fn run_if_enabled ( & self ) -> WillExecute {
283
- if self . config . run_enabled ( ) {
284
- WillExecute :: Yes
285
- } else {
286
- WillExecute :: Disabled
287
- }
279
+ if self . config . run_enabled ( ) { WillExecute :: Yes } else { WillExecute :: Disabled }
288
280
}
289
281
290
282
fn should_run_successfully ( & self , pm : Option < PassMode > ) -> bool {
@@ -2693,11 +2685,7 @@ impl<'test> TestCx<'test> {
2693
2685
/// The revision, ignored for incremental compilation since it wants all revisions in
2694
2686
/// the same directory.
2695
2687
fn safe_revision ( & self ) -> Option < & str > {
2696
- if self . config . mode == Incremental {
2697
- None
2698
- } else {
2699
- self . revision
2700
- }
2688
+ if self . config . mode == Incremental { None } else { self . revision }
2701
2689
}
2702
2690
2703
2691
/// Gets the absolute path to the directory where all output for the given
@@ -2920,11 +2908,7 @@ impl<'test> TestCx<'test> {
2920
2908
2921
2909
fn charset ( ) -> & ' static str {
2922
2910
// FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
2923
- if cfg ! ( target_os = "freebsd" ) {
2924
- "ISO-8859-1"
2925
- } else {
2926
- "UTF-8"
2927
- }
2911
+ if cfg ! ( target_os = "freebsd" ) { "ISO-8859-1" } else { "UTF-8" }
2928
2912
}
2929
2913
2930
2914
fn run_rustdoc_test ( & self ) {
@@ -4715,11 +4699,7 @@ impl<'test> TestCx<'test> {
4715
4699
for output_file in files {
4716
4700
println ! ( "Actual {} saved to {}" , kind, output_file. display( ) ) ;
4717
4701
}
4718
- if self . config . bless {
4719
- 0
4720
- } else {
4721
- 1
4722
- }
4702
+ if self . config . bless { 0 } else { 1 }
4723
4703
}
4724
4704
4725
4705
fn check_and_prune_duplicate_outputs (
0 commit comments