Skip to content

Commit 13a27d1

Browse files
committed
clean up unneeded match
1 parent 9200778 commit 13a27d1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

phd-tests/runner/src/execute.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub async fn run_tests_with_ctx(
101101
let test_ctx = ctx.clone();
102102
let tc = execution.tc;
103103
let mut sigint_rx_task = sigint_rx.clone();
104-
let test_outcome = match tokio::spawn(async move {
104+
let test_outcome = tokio::spawn(async move {
105105
tokio::select! {
106106
// Ensure interrupt signals are always handled instead of
107107
// continuing to run the test.
@@ -120,12 +120,11 @@ pub async fn run_tests_with_ctx(
120120
}
121121
})
122122
.await
123-
{
124-
Ok(outcome) => outcome,
125-
Err(_) => TestOutcome::Failed(Some(
123+
.unwrap_or_else(|_| {
124+
TestOutcome::Failed(Some(
126125
"test task panicked, see test logs".to_string(),
127-
)),
128-
};
126+
))
127+
});
129128

130129
info!(
131130
"test {} ... {}{}",

0 commit comments

Comments
 (0)