Skip to content

Commit b6948c1

Browse files
committed
Remove unneeded async qualifiers
1 parent 5f1cc50 commit b6948c1

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ impl<B> Coordinator<B>
844844
where
845845
B: Backend,
846846
{
847-
pub async fn new(backend: B) -> Self {
847+
pub fn new(backend: B) -> Self {
848848
let token = CancellationToken::new();
849849

850850
Self {
@@ -1090,8 +1090,8 @@ where
10901090
}
10911091

10921092
impl Coordinator<DockerBackend> {
1093-
pub async fn new_docker() -> Self {
1094-
Self::new(DockerBackend(())).await
1093+
pub fn new_docker() -> Self {
1094+
Self::new(DockerBackend(()))
10951095
}
10961096
}
10971097

@@ -2789,17 +2789,16 @@ mod tests {
27892789
where
27902790
T: Backend,
27912791
{
2792-
async fn with<F, Fut>(f: F) -> Self
2792+
async fn with<F>(f: F) -> Self
27932793
where
2794-
F: FnOnce() -> Fut,
2795-
Fut: Future<Output = Coordinator<T>>,
2794+
F: FnOnce() -> Coordinator<T>,
27962795
{
27972796
let semaphore = CONCURRENT_TEST_SEMAPHORE.clone();
27982797
let permit = semaphore
27992798
.acquire_owned()
28002799
.await
28012800
.expect("Unable to acquire permit");
2802-
let coordinator = f().await;
2801+
let coordinator = f();
28032802
Self {
28042803
_permit: permit,
28052804
coordinator,

ui/src/server_axum.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ where
407407
for<'f> F:
408408
FnOnce(&'f coordinator::Coordinator<DockerBackend>, Req) -> BoxFuture<'f, Result<Resp>>,
409409
{
410-
let coordinator = orchestrator::coordinator::Coordinator::new_docker().await;
410+
let coordinator = orchestrator::coordinator::Coordinator::new_docker();
411411

412412
let job = async {
413413
let req = req.try_into()?;
@@ -675,7 +675,7 @@ struct SandboxCache {
675675

676676
impl SandboxCache {
677677
async fn crates(&self) -> Result<Stamped<MetaCratesResponse>> {
678-
let coordinator = Coordinator::new_docker().await;
678+
let coordinator = Coordinator::new_docker();
679679

680680
let c = self
681681
.crates
@@ -691,7 +691,7 @@ impl SandboxCache {
691691
}
692692

693693
async fn versions(&self) -> Result<Stamped<MetaVersionsResponse>> {
694-
let coordinator = Coordinator::new_docker().await;
694+
let coordinator = Coordinator::new_docker();
695695

696696
let v = self
697697
.versions
@@ -707,7 +707,7 @@ impl SandboxCache {
707707
}
708708

709709
async fn raw_versions(&self) -> Result<Stamped<Arc<Versions>>> {
710-
let coordinator = Coordinator::new_docker().await;
710+
let coordinator = Coordinator::new_docker();
711711

712712
let rv = self
713713
.raw_versions

ui/src/server_axum/websocket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl CoordinatorManager {
247247

248248
async fn new() -> Self {
249249
Self {
250-
coordinator: Arc::new(Coordinator::new_docker().await),
250+
coordinator: Arc::new(Coordinator::new_docker()),
251251
tasks: Default::default(),
252252
semaphore: Arc::new(Semaphore::new(Self::N_PARALLEL)),
253253
abort_handles: Default::default(),

0 commit comments

Comments
 (0)