Remove some status stuff

This commit is contained in:
Julia 2023-06-23 00:17:27 -04:00
parent 3302e1133f
commit 374c1a3a3e
3 changed files with 4 additions and 10 deletions

View File

@ -203,14 +203,12 @@ impl ActivityIndicator {
}
// Show any language server installation info.
let mut validating = SmallVec::<[_; 3]>::new();
let mut downloading = SmallVec::<[_; 3]>::new();
let mut checking_for_update = SmallVec::<[_; 3]>::new();
let mut failed = SmallVec::<[_; 3]>::new();
for status in &self.statuses {
let name = status.name.clone();
match status.status {
LanguageServerBinaryStatus::Validating => validating.push(name),
LanguageServerBinaryStatus::CheckingForUpdate => checking_for_update.push(name),
LanguageServerBinaryStatus::Downloading => downloading.push(name),
LanguageServerBinaryStatus::Failed { .. } => failed.push(name),
@ -242,7 +240,7 @@ impl ActivityIndicator {
),
on_click: None,
};
} else if !failed.is_empty() || !validating.is_empty() {
} else if !failed.is_empty() {
return Content {
icon: Some(WARNING_ICON),
message: format!(

View File

@ -536,7 +536,6 @@ struct BracketConfig {
#[derive(Clone)]
pub enum LanguageServerBinaryStatus {
Validating,
CheckingForUpdate,
Downloading,
Downloaded,

View File

@ -280,8 +280,6 @@ pub enum Event {
}
pub enum LanguageServerState {
Validating(Task<Option<Arc<LanguageServer>>>),
Starting(Task<Option<Arc<LanguageServer>>>),
Running {
@ -2485,7 +2483,7 @@ impl Project {
.await;
this.update(&mut cx, |_, cx| {
Self::check_errored_server_id(
Self::check_errored_server(
language,
adapter,
server_id,
@ -2935,7 +2933,6 @@ impl Project {
let mut root_path = None;
let server = match server_state {
Some(LanguageServerState::Validating(task)) => task.await,
Some(LanguageServerState::Starting(task)) => task.await,
Some(LanguageServerState::Running { server, .. }) => Some(server),
None => None,
@ -3047,7 +3044,7 @@ impl Project {
.detach();
}
fn check_errored_server_id(
fn check_errored_server(
language: Arc<Language>,
adapter: Arc<CachedLspAdapter>,
server_id: LanguageServerId,
@ -7391,7 +7388,7 @@ impl Entity for Project {
use LanguageServerState::*;
match server_state {
Running { server, .. } => server.shutdown()?.await,
Starting(task) | Validating(task) => task.await?.shutdown()?.await,
Starting(task) => task.await?.shutdown()?.await,
}
})
.collect::<Vec<_>>();