diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-05 22:50:47 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-05 22:50:47 +0100 |
commit | 30eb458b4fa8adcecd8cbf731bd1cfa9a7a8b88b (patch) | |
tree | 1ee318a9568c8bf1d0b314ef996581bb4e518b9e /crates/ra_ide/src/typing | |
parent | 78c82eff95cae43b389dbd6e590d7f09bac8f3f1 (diff) | |
parent | ca9e0f5fe9ad29ab0c5a0771a0d0eaec97e4104b (diff) |
Merge #4332
4332: Refactor TextEdit r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/typing')
-rw-r--r-- | crates/ra_ide/src/typing/on_enter.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs index 725237464..78a40cc94 100644 --- a/crates/ra_ide/src/typing/on_enter.rs +++ b/crates/ra_ide/src/typing/on_enter.rs | |||
@@ -96,7 +96,8 @@ mod tests { | |||
96 | let result = analysis.on_enter(FilePosition { offset, file_id }).unwrap()?; | 96 | let result = analysis.on_enter(FilePosition { offset, file_id }).unwrap()?; |
97 | 97 | ||
98 | assert_eq!(result.source_file_edits.len(), 1); | 98 | assert_eq!(result.source_file_edits.len(), 1); |
99 | let actual = result.source_file_edits[0].edit.apply(&before); | 99 | let mut actual = before.to_string(); |
100 | result.source_file_edits[0].edit.apply(&mut actual); | ||
100 | let actual = add_cursor(&actual, result.cursor_position.unwrap().offset); | 101 | let actual = add_cursor(&actual, result.cursor_position.unwrap().offset); |
101 | Some(actual) | 102 | Some(actual) |
102 | } | 103 | } |