Don't spawn for will_fetch_server
as it is being immediately awaited anyways
This commit is contained in:
parent
aae59a2842
commit
9733d34c94
2 changed files with 17 additions and 22 deletions
|
@ -29,7 +29,7 @@ use async_trait::async_trait;
|
|||
use collections::{HashMap, HashSet, IndexSet};
|
||||
use fs::Fs;
|
||||
use futures::Future;
|
||||
use gpui::{App, AsyncApp, Entity, SharedString, Task};
|
||||
use gpui::{App, AsyncApp, Entity, SharedString};
|
||||
pub use highlight_map::HighlightMap;
|
||||
use http_client::HttpClient;
|
||||
pub use language_registry::{
|
||||
|
@ -491,8 +491,8 @@ pub trait LspInstaller {
|
|||
&self,
|
||||
_: &Arc<dyn LspAdapterDelegate>,
|
||||
_: &mut AsyncApp,
|
||||
) -> Option<Task<Result<()>>> {
|
||||
None
|
||||
) -> impl Future<Output = Result<()>> {
|
||||
async { Ok(()) }
|
||||
}
|
||||
|
||||
fn check_if_version_installed(
|
||||
|
@ -545,9 +545,7 @@ where
|
|||
container_dir: PathBuf,
|
||||
cx: &mut AsyncApp,
|
||||
) -> Result<LanguageServerBinary> {
|
||||
if let Some(task) = self.will_fetch_server(delegate, cx) {
|
||||
task.await?;
|
||||
}
|
||||
self.will_fetch_server(delegate, cx).await?;
|
||||
|
||||
let name = self.name();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue