Skip to content

Commit 03c7625

Browse files
committed
restructure try_run_tests
1 parent 17064f3 commit 03c7625

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/bootstrap/src/utils/exec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,9 @@ impl ExecutionContext {
624624
exit!(1);
625625
}
626626

627-
pub fn stream<'a>(
627+
pub fn stream(
628628
&self,
629-
command: &'a mut BootstrapCommand,
629+
command: &mut BootstrapCommand,
630630
stdout: OutputMode,
631631
stderr: OutputMode,
632632
) -> Option<StreamingCommand> {

src/bootstrap/src/utils/render_tests.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ pub(crate) fn try_run_tests(
3434
cmd: &mut BootstrapCommand,
3535
stream: bool,
3636
) -> bool {
37-
if !run_tests(builder, cmd, stream) {
38-
if builder.fail_fast {
39-
crate::exit!(1);
40-
} else {
41-
builder.config.exec_ctx().add_to_delay_failure(format!("{cmd:?}"));
42-
false
43-
}
44-
} else {
45-
true
37+
if run_tests(builder, cmd, stream) {
38+
return true;
4639
}
40+
41+
if builder.fail_fast {
42+
crate::exit!(1);
43+
}
44+
45+
builder.config.exec_ctx().add_to_delay_failure(format!("{cmd:?}"));
46+
47+
false
4748
}
4849

4950
fn run_tests(builder: &Builder<'_>, cmd: &mut BootstrapCommand, stream: bool) -> bool {

0 commit comments

Comments
 (0)