diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-02 15:10:13 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-02 15:10:13 +0100 |
commit | 83f3cdca4f4a3ba612c082bba35c8ecf76abc166 (patch) | |
tree | 8c7c983c95b567ccbcfd96cd778f36d8af9b2bd3 /crates/rust-analyzer/src/reload.rs | |
parent | 1a3a7f42373e1115c9868d2f7173a302e79d6d12 (diff) | |
parent | 6a694ad047802e6e5aec8522556d2db09c10b18f (diff) |
Merge #5191
5191: Minor r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/rust-analyzer/src/reload.rs')
-rw-r--r-- | crates/rust-analyzer/src/reload.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs index 523b04b97..9fc56349c 100644 --- a/crates/rust-analyzer/src/reload.rs +++ b/crates/rust-analyzer/src/reload.rs | |||
@@ -27,16 +27,15 @@ impl GlobalState { | |||
27 | } | 27 | } |
28 | pub(crate) fn reload(&mut self) { | 28 | pub(crate) fn reload(&mut self) { |
29 | log::info!("reloading projects: {:?}", self.config.linked_projects); | 29 | log::info!("reloading projects: {:?}", self.config.linked_projects); |
30 | let workspaces = { | 30 | if self.config.linked_projects.is_empty() && self.config.notifications.cargo_toml_not_found |
31 | if self.config.linked_projects.is_empty() | 31 | { |
32 | && self.config.notifications.cargo_toml_not_found | 32 | self.show_message( |
33 | { | 33 | lsp_types::MessageType::Error, |
34 | self.show_message( | 34 | "rust-analyzer failed to discover workspace".to_string(), |
35 | lsp_types::MessageType::Error, | 35 | ); |
36 | "rust-analyzer failed to discover workspace".to_string(), | 36 | }; |
37 | ); | ||
38 | }; | ||
39 | 37 | ||
38 | let workspaces = { | ||
40 | self.config | 39 | self.config |
41 | .linked_projects | 40 | .linked_projects |
42 | .iter() | 41 | .iter() |