aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/conv.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/conv.rs')
-rw-r--r--crates/ra_lsp_server/src/conv.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs
index fc01b1c0e..d0bdc94aa 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/ra_lsp_server/src/conv.rs
@@ -412,6 +412,19 @@ impl TryConvWith for (FileId, RangeInfo<NavigationTarget>) {
412 } 412 }
413} 413}
414 414
415impl TryConvWith for (FileId, RangeInfo<Vec<NavigationTarget>>) {
416 type Ctx = WorldSnapshot;
417 type Output = req::GotoDefinitionResponse;
418 fn try_conv_with(self, world: &WorldSnapshot) -> Result<req::GotoTypeDefinitionResponse> {
419 let (file_id, RangeInfo { range, info: navs }) = self;
420 let links = navs
421 .into_iter()
422 .map(|nav| (file_id, RangeInfo::new(range, nav)))
423 .try_conv_with_to_vec(world)?;
424 Ok(links.into())
425 }
426}
427
415pub fn to_location( 428pub fn to_location(
416 file_id: FileId, 429 file_id: FileId,
417 range: TextRange, 430 range: TextRange,