diff options
author | Aleksey Kladov <[email protected]> | 2018-12-21 08:24:16 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-21 08:52:32 +0000 |
commit | 0063f03e86f4222a5027720142eb20db4adc485d (patch) | |
tree | 888c4de1eaa96cccb0b1870464e095679c5290b1 /crates/ra_lsp_server/src/main_loop/handlers.rs | |
parent | 164d53b22f345e50c67781af545310d2193e8a5c (diff) |
hide atom edits a bit
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop/handlers.rs | 11 |
1 files changed, 9 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 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( | |||
107 | }; | 107 | }; |
108 | let edits = match world.analysis().on_eq_typed(position) { | 108 | let edits = match world.analysis().on_eq_typed(position) { |
109 | None => return Ok(None), | 109 | None => return Ok(None), |
110 | Some(mut action) => action.source_file_edits.pop().unwrap().edits, | 110 | Some(mut action) => action |
111 | .source_file_edits | ||
112 | .pop() | ||
113 | .unwrap() | ||
114 | .edit | ||
115 | .as_atoms() | ||
116 | .iter() | ||
117 | .map_conv_with(&line_index) | ||
118 | .collect(), | ||
111 | }; | 119 | }; |
112 | let edits = edits.into_iter().map_conv_with(&line_index).collect(); | ||
113 | Ok(Some(edits)) | 120 | Ok(Some(edits)) |
114 | } | 121 | } |
115 | 122 | ||