From dbbb0beb3ec9f11a635f43e60f3b3a42ba61338a Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 25 Jul 2019 20:22:41 +0300 Subject: Make Analysis api cancellable --- crates/ra_lsp_server/src/world.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/world.rs') diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index 9fd654305..1d7755910 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs @@ -215,7 +215,12 @@ impl WorldSnapshot { } } res.push_str("\nanalysis:\n"); - res.push_str(&self.analysis.status()); + res.push_str( + &self + .analysis + .status() + .unwrap_or_else(|_| "Analysis retrieval was cancelled".to_owned()), + ); res } -- cgit v1.2.3