From be75e547ce13dea281d2787ef5280637e76f6156 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 31 Dec 2018 12:17:05 +0000 Subject: Use TryConv for conversion --- crates/ra_lsp_server/src/main_loop/handlers.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src') 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( ) -> Result>> { let file_id = params.text_document.try_conv_with(&world)?; let line_index = world.analysis().file_line_index(file_id); - let offset = params.position.conv_with(&line_index); let refs = world .analysis() - .find_all_refs(FilePosition { file_id, offset })?; + .find_all_refs(params.try_conv_with(&world)?)?; Ok(Some( refs.into_iter() -- cgit v1.2.3