From 0063f03e86f4222a5027720142eb20db4adc485d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 21 Dec 2018 11:24:16 +0300 Subject: hide atom edits a bit --- crates/ra_lsp_server/src/main_loop/handlers.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 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 801966304..1751d7fa8 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -107,9 +107,16 @@ pub fn handle_on_type_formatting( }; let edits = match world.analysis().on_eq_typed(position) { None => return Ok(None), - Some(mut action) => action.source_file_edits.pop().unwrap().edits, + Some(mut action) => action + .source_file_edits + .pop() + .unwrap() + .edit + .as_atoms() + .iter() + .map_conv_with(&line_index) + .collect(), }; - let edits = edits.into_iter().map_conv_with(&line_index).collect(); Ok(Some(edits)) } -- cgit v1.2.3