@@ -263,19 +263,11 @@ impl<'test> TestCx<'test> {
263
263
Ui | MirOpt => false ,
264
264
mode => panic ! ( "unimplemented for mode {:?}" , mode) ,
265
265
} ;
266
- if test_should_run {
267
- self . run_if_enabled ( )
268
- } else {
269
- WillExecute :: No
270
- }
266
+ if test_should_run { self . run_if_enabled ( ) } else { WillExecute :: No }
271
267
}
272
268
273
269
fn run_if_enabled ( & self ) -> WillExecute {
274
- if self . config . run_enabled ( ) {
275
- WillExecute :: Yes
276
- } else {
277
- WillExecute :: Disabled
278
- }
270
+ if self . config . run_enabled ( ) { WillExecute :: Yes } else { WillExecute :: Disabled }
279
271
}
280
272
281
273
fn should_run_successfully ( & self , pm : Option < PassMode > ) -> bool {
@@ -2029,11 +2021,7 @@ impl<'test> TestCx<'test> {
2029
2021
Some ( ref s) => s
2030
2022
. split ( ' ' )
2031
2023
. filter_map ( |s| {
2032
- if s. chars ( ) . all ( |c| c. is_whitespace ( ) ) {
2033
- None
2034
- } else {
2035
- Some ( s. to_owned ( ) )
2036
- }
2024
+ if s. chars ( ) . all ( |c| c. is_whitespace ( ) ) { None } else { Some ( s. to_owned ( ) ) }
2037
2025
} )
2038
2026
. collect ( ) ,
2039
2027
None => Vec :: new ( ) ,
@@ -2092,11 +2080,7 @@ impl<'test> TestCx<'test> {
2092
2080
/// The revision, ignored for incremental compilation since it wants all revisions in
2093
2081
/// the same directory.
2094
2082
fn safe_revision ( & self ) -> Option < & str > {
2095
- if self . config . mode == Incremental {
2096
- None
2097
- } else {
2098
- self . revision
2099
- }
2083
+ if self . config . mode == Incremental { None } else { self . revision }
2100
2084
}
2101
2085
2102
2086
/// Gets the absolute path to the directory where all output for the given
@@ -2251,11 +2235,7 @@ impl<'test> TestCx<'test> {
2251
2235
2252
2236
fn charset ( ) -> & ' static str {
2253
2237
// FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
2254
- if cfg ! ( target_os = "freebsd" ) {
2255
- "ISO-8859-1"
2256
- } else {
2257
- "UTF-8"
2258
- }
2238
+ if cfg ! ( target_os = "freebsd" ) { "ISO-8859-1" } else { "UTF-8" }
2259
2239
}
2260
2240
2261
2241
fn run_rustdoc_test ( & self ) {
@@ -3045,11 +3025,7 @@ impl<'test> TestCx<'test> {
3045
3025
let ( stderr_kind, stdout_kind) = match output_kind {
3046
3026
TestOutput :: Compile => (
3047
3027
{
3048
- if self . props . stderr_per_bitwidth {
3049
- & stderr_bits
3050
- } else {
3051
- UI_STDERR
3052
- }
3028
+ if self . props . stderr_per_bitwidth { & stderr_bits } else { UI_STDERR }
3053
3029
} ,
3054
3030
UI_STDOUT ,
3055
3031
) ,
@@ -3746,11 +3722,7 @@ impl<'test> TestCx<'test> {
3746
3722
for output_file in files {
3747
3723
println ! ( "Actual {} saved to {}" , kind, output_file. display( ) ) ;
3748
3724
}
3749
- if self . config . bless {
3750
- 0
3751
- } else {
3752
- 1
3753
- }
3725
+ if self . config . bless { 0 } else { 1 }
3754
3726
}
3755
3727
3756
3728
fn prune_duplicate_output ( & self , mode : CompareMode , kind : & str , canon_content : & str ) {
0 commit comments