@@ -263,19 +263,11 @@ impl<'test> TestCx<'test> {
263263 Ui | MirOpt => false ,
264264 mode => panic ! ( "unimplemented for mode {:?}" , mode) ,
265265 } ;
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 }
271267 }
272268
273269 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 }
279271 }
280272
281273 fn should_run_successfully ( & self , pm : Option < PassMode > ) -> bool {
@@ -2029,11 +2021,7 @@ impl<'test> TestCx<'test> {
20292021 Some ( ref s) => s
20302022 . split ( ' ' )
20312023 . 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 ( ) ) }
20372025 } )
20382026 . collect ( ) ,
20392027 None => Vec :: new ( ) ,
@@ -2092,11 +2080,7 @@ impl<'test> TestCx<'test> {
20922080 /// The revision, ignored for incremental compilation since it wants all revisions in
20932081 /// the same directory.
20942082 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 }
21002084 }
21012085
21022086 /// Gets the absolute path to the directory where all output for the given
@@ -2251,11 +2235,7 @@ impl<'test> TestCx<'test> {
22512235
22522236 fn charset ( ) -> & ' static str {
22532237 // 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" }
22592239 }
22602240
22612241 fn run_rustdoc_test ( & self ) {
@@ -3045,11 +3025,7 @@ impl<'test> TestCx<'test> {
30453025 let ( stderr_kind, stdout_kind) = match output_kind {
30463026 TestOutput :: Compile => (
30473027 {
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 }
30533029 } ,
30543030 UI_STDOUT ,
30553031 ) ,
@@ -3746,11 +3722,7 @@ impl<'test> TestCx<'test> {
37463722 for output_file in files {
37473723 println ! ( "Actual {} saved to {}" , kind, output_file. display( ) ) ;
37483724 }
3749- if self . config . bless {
3750- 0
3751- } else {
3752- 1
3753- }
3725+ if self . config . bless { 0 } else { 1 }
37543726 }
37553727
37563728 fn prune_duplicate_output ( & self , mode : CompareMode , kind : & str , canon_content : & str ) {
0 commit comments