Skip to content

Commit

Permalink
Revert format change
Browse files Browse the repository at this point in the history
  • Loading branch information
bzEq committed Jul 19, 2024
1 parent c72df9d commit ec805d1
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,19 +280,11 @@ impl<'test> TestCx<'test> {
Ui | MirOpt => false,
mode => panic!("unimplemented for mode {:?}", mode),
};
if test_should_run {
self.run_if_enabled()
} else {
WillExecute::No
}
if test_should_run { self.run_if_enabled() } else { WillExecute::No }
}

fn run_if_enabled(&self) -> WillExecute {
if self.config.run_enabled() {
WillExecute::Yes
} else {
WillExecute::Disabled
}
if self.config.run_enabled() { WillExecute::Yes } else { WillExecute::Disabled }
}

fn should_run_successfully(&self, pm: Option<PassMode>) -> bool {
Expand Down Expand Up @@ -2451,11 +2443,7 @@ impl<'test> TestCx<'test> {
/// The revision, ignored for incremental compilation since it wants all revisions in
/// the same directory.
fn safe_revision(&self) -> Option<&str> {
if self.config.mode == Incremental {
None
} else {
self.revision
}
if self.config.mode == Incremental { None } else { self.revision }
}

/// Gets the absolute path to the directory where all output for the given
Expand Down Expand Up @@ -2679,11 +2667,7 @@ impl<'test> TestCx<'test> {

fn charset() -> &'static str {
// FreeBSD 10.1 defaults to GDB 6.1.1 which doesn't support "auto" charset
if cfg!(target_os = "freebsd") {
"ISO-8859-1"
} else {
"UTF-8"
}
if cfg!(target_os = "freebsd") { "ISO-8859-1" } else { "UTF-8" }
}

fn run_rustdoc_test(&self) {
Expand Down Expand Up @@ -4506,11 +4490,7 @@ impl<'test> TestCx<'test> {
for output_file in files {
println!("Actual {} saved to {}", kind, output_file.display());
}
if self.config.bless {
0
} else {
1
}
if self.config.bless { 0 } else { 1 }
}

fn check_and_prune_duplicate_outputs(
Expand Down

0 comments on commit ec805d1

Please sign in to comment.