diff options
author | Blaž Hrastnik | 2022-02-05 06:05:19 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-02-05 06:05:19 +0000 |
commit | 6ea477ab60e242c2cd66af32ece601a691fcec4b (patch) | |
tree | 1ba67327d6086d05f5d6c59db0bd0c4d5c9a0736 /helix-term/src/job.rs | |
parent | d3221b03a2b3ee5acc68066f34c4e56e2d05ce94 (diff) |
Don't use block_on in jobs.finish(), we can .await
Diffstat (limited to 'helix-term/src/job.rs')
-rw-r--r-- | helix-term/src/job.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/job.rs b/helix-term/src/job.rs index f5a0a425..a6a77021 100644 --- a/helix-term/src/job.rs +++ b/helix-term/src/job.rs @@ -93,8 +93,8 @@ impl Jobs { } /// Blocks until all the jobs that need to be waited on are done. - pub fn finish(&mut self) { + pub async fn finish(&mut self) { let wait_futures = std::mem::take(&mut self.wait_futures); - helix_lsp::block_on(wait_futures.for_each(|_| future::ready(()))); + wait_futures.for_each(|_| future::ready(())).await } } |