aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/main_loop
diff options
context:
space:
mode:
authorDJMcNab <[email protected]>2018-12-31 12:17:05 +0000
committerDJMcNab <[email protected]>2018-12-31 12:17:05 +0000
commitbe75e547ce13dea281d2787ef5280637e76f6156 (patch)
treed1e1f85c4a1d7a177e5811a9df2b1574d3bec959 /crates/ra_lsp_server/src/main_loop
parent79941a9e701c6be849d40cb43744f1e2fee56354 (diff)
Use TryConv for conversion
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 60441e8ea..228eb7ce5 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -678,11 +678,10 @@ pub fn handle_document_highlight(
678) -> Result<Option<Vec<DocumentHighlight>>> { 678) -> Result<Option<Vec<DocumentHighlight>>> {
679 let file_id = params.text_document.try_conv_with(&world)?; 679 let file_id = params.text_document.try_conv_with(&world)?;
680 let line_index = world.analysis().file_line_index(file_id); 680 let line_index = world.analysis().file_line_index(file_id);
681 let offset = params.position.conv_with(&line_index);
682 681
683 let refs = world 682 let refs = world
684 .analysis() 683 .analysis()
685 .find_all_refs(FilePosition { file_id, offset })?; 684 .find_all_refs(params.try_conv_with(&world)?)?;
686 685
687 Ok(Some( 686 Ok(Some(
688 refs.into_iter() 687 refs.into_iter()