Skip to content

Commit 952e95e

Browse files
committed
Simplify test timeouts now that async fn in traits is stable
1 parent f698118 commit 952e95e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,14 +4265,10 @@ mod tests {
42654265
});
42664266

42674267
trait TimeoutExt: Future + Sized {
4268-
#[allow(clippy::type_complexity)]
4269-
fn with_timeout(
4270-
self,
4271-
) -> futures::future::Map<
4272-
tokio::time::Timeout<Self>,
4273-
fn(Result<Self::Output, tokio::time::error::Elapsed>) -> Self::Output,
4274-
> {
4275-
tokio::time::timeout(*TIMEOUT, self).map(|v| v.expect("The operation timed out"))
4268+
async fn with_timeout(self) -> Self::Output {
4269+
tokio::time::timeout(*TIMEOUT, self)
4270+
.await
4271+
.expect("The operation timed out")
42764272
}
42774273
}
42784274

0 commit comments

Comments
 (0)