aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-05 17:03:55 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-05 17:03:55 +0000
commitcc53e9e7d17871c03fa9d88c709873e20690ca84 (patch)
tree9021f6b236ce24d19a7a419c9f8c9c08c9ff08f4 /crates/ra_lsp_server
parent2a19d699eb594c4929215a24df333f87fd41881a (diff)
parentee461a211195b093269ead477f01fcf63f20cf34 (diff)
Merge #437
437: refactor goto defenition r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index ffca3f51c..1baed73ad 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -207,12 +207,11 @@ pub fn handle_goto_definition(
207 params: req::TextDocumentPositionParams, 207 params: req::TextDocumentPositionParams,
208) -> Result<Option<req::GotoDefinitionResponse>> { 208) -> Result<Option<req::GotoDefinitionResponse>> {
209 let position = params.try_conv_with(&world)?; 209 let position = params.try_conv_with(&world)?;
210 let rr = match world.analysis().approximately_resolve_symbol(position)? { 210 let navs = match world.analysis().goto_defenition(position)? {
211 None => return Ok(None), 211 None => return Ok(None),
212 Some(it) => it, 212 Some(it) => it,
213 }; 213 };
214 let res = rr 214 let res = navs
215 .resolves_to
216 .into_iter() 215 .into_iter()
217 .map(|nav| nav.try_conv_with(&world)) 216 .map(|nav| nav.try_conv_with(&world))
218 .collect::<Result<Vec<_>>>()?; 217 .collect::<Result<Vec<_>>>()?;