From 1ec1bd8139251092e567d0b6034f96e3fdf33afb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 20 Jan 2019 20:59:46 +0300 Subject: make matching brace consistent --- crates/ra_lsp_server/src/main_loop/handlers.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 8f9db68a2..b70d67b4d 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -51,7 +51,6 @@ pub fn handle_find_matching_brace( params: req::FindMatchingBraceParams, ) -> Result> { let file_id = params.text_document.try_conv_with(&world)?; - let file = world.analysis().file_syntax(file_id); let line_index = world.analysis().file_line_index(file_id); let res = params .offsets @@ -60,7 +59,7 @@ pub fn handle_find_matching_brace( .map(|offset| { world .analysis() - .matching_brace(&file, offset) + .matching_brace(FilePosition { file_id, offset }) .unwrap_or(offset) }) .map_conv_with(&line_index) -- cgit v1.2.3