diff options
author | Wilco Kusee <[email protected]> | 2020-01-08 13:04:47 +0000 |
---|---|---|
committer | Wilco Kusee <[email protected]> | 2020-01-08 13:06:08 +0000 |
commit | 003620f0d61c1c8792453294d9b2ef535afc2831 (patch) | |
tree | 37f5d4ab7f215e2ff775ac632a8f6d4be89f994e /crates/ra_lsp_server/src | |
parent | e7bb82c3a494e08cbcd283b8292579a9cf0bb1a3 (diff) |
Use downcasting for CargoTomlNotFoundError
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 4 |
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}; | |||
13 | use ra_cargo_watch::{CheckOptions, CheckTask}; | 13 | use ra_cargo_watch::{CheckOptions, CheckTask}; |
14 | use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; | 14 | use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; |
15 | use ra_prof::profile; | 15 | use ra_prof::profile; |
16 | use ra_project_model::WorkspaceError; | ||
17 | use ra_vfs::{VfsTask, Watch}; | 16 | use ra_vfs::{VfsTask, Watch}; |
18 | use relative_path::RelativePathBuf; | 17 | use relative_path::RelativePathBuf; |
19 | use rustc_hash::FxHashSet; | 18 | use 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 | } |