From 003620f0d61c1c8792453294d9b2ef535afc2831 Mon Sep 17 00:00:00 2001 From: Wilco Kusee Date: Wed, 8 Jan 2020 14:04:47 +0100 Subject: Use downcasting for CargoTomlNotFoundError --- crates/ra_lsp_server/src/main_loop.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop.rs') 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}; use ra_cargo_watch::{CheckOptions, CheckTask}; use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; use ra_prof::profile; -use ra_project_model::WorkspaceError; use ra_vfs::{VfsTask, Watch}; use relative_path::RelativePathBuf; use rustc_hash::FxHashSet; @@ -92,7 +91,8 @@ pub fn main_loop( Ok(workspace) => loaded_workspaces.push(workspace), Err(e) => { log::error!("loading workspace failed: {}", e); - if let WorkspaceError::CargoTomlNotFound(_) = e { + if let Some(ra_project_model::CargoTomlNotFoundError(_)) = e.downcast_ref() + { if !feature_flags.get("notifications.cargo-toml-not-found") { continue; } -- cgit v1.2.3