diff options
author | Aleksey Kladov <[email protected]> | 2019-01-05 10:23:34 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-05 16:30:49 +0000 |
commit | 4551155073d8e12dd7aa467f6cd90e8705a115b3 (patch) | |
tree | 1980a42d5b690fb95ba3d407687f8dc66bc75cfb /crates/ra_lsp_server/src/main_loop/handlers.rs | |
parent | ad2a5da259aba485150cb3c3a8395c18be12cba7 (diff) |
introduce separate goto_defenition
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 5 |
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<_>>>()?; |