aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorWilco Kusee <[email protected]>2020-01-08 13:04:47 +0000
committerWilco Kusee <[email protected]>2020-01-08 13:06:08 +0000
commit003620f0d61c1c8792453294d9b2ef535afc2831 (patch)
tree37f5d4ab7f215e2ff775ac632a8f6d4be89f994e /crates/ra_lsp_server
parente7bb82c3a494e08cbcd283b8292579a9cf0bb1a3 (diff)
Use downcasting for CargoTomlNotFoundError
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 5ca37981e..53c6834d0 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -13,7 +13,6 @@ use lsp_types::{ClientCapabilities, NumberOrString};
13use ra_cargo_watch::{CheckOptions, CheckTask}; 13use ra_cargo_watch::{CheckOptions, CheckTask};
14use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; 14use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId};
15use ra_prof::profile; 15use ra_prof::profile;
16use ra_project_model::WorkspaceError;
17use ra_vfs::{VfsTask, Watch}; 16use ra_vfs::{VfsTask, Watch};
18use relative_path::RelativePathBuf; 17use relative_path::RelativePathBuf;
19use rustc_hash::FxHashSet; 18use rustc_hash::FxHashSet;
@@ -92,7 +91,8 @@ pub fn main_loop(
92 Ok(workspace) => loaded_workspaces.push(workspace), 91 Ok(workspace) => loaded_workspaces.push(workspace),
93 Err(e) => { 92 Err(e) => {
94 log::error!("loading workspace failed: {}", e); 93 log::error!("loading workspace failed: {}", e);
95 if let WorkspaceError::CargoTomlNotFound(_) = e { 94 if let Some(ra_project_model::CargoTomlNotFoundError(_)) = e.downcast_ref()
95 {
96 if !feature_flags.get("notifications.cargo-toml-not-found") { 96 if !feature_flags.get("notifications.cargo-toml-not-found") {
97 continue; 97 continue;
98 } 98 }