diff options
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r-- | crates/ra_ide_db/src/line_index_utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_db/src/line_index_utils.rs b/crates/ra_ide_db/src/line_index_utils.rs index 039a12c0d..7fa6fc448 100644 --- a/crates/ra_ide_db/src/line_index_utils.rs +++ b/crates/ra_ide_db/src/line_index_utils.rs | |||
@@ -10,7 +10,7 @@ | |||
10 | use std::convert::TryInto; | 10 | use std::convert::TryInto; |
11 | 11 | ||
12 | use ra_syntax::{TextRange, TextSize}; | 12 | use ra_syntax::{TextRange, TextSize}; |
13 | use ra_text_edit::{AtomTextEdit, TextEdit}; | 13 | use ra_text_edit::{Indel, TextEdit}; |
14 | 14 | ||
15 | use crate::line_index::{LineCol, LineIndex, Utf16Char}; | 15 | use crate::line_index::{LineCol, LineIndex, Utf16Char}; |
16 | 16 | ||
@@ -182,14 +182,14 @@ struct TranslatedEdit<'a> { | |||
182 | } | 182 | } |
183 | 183 | ||
184 | struct Edits<'a> { | 184 | struct Edits<'a> { |
185 | edits: &'a [AtomTextEdit], | 185 | edits: &'a [Indel], |
186 | current: Option<TranslatedEdit<'a>>, | 186 | current: Option<TranslatedEdit<'a>>, |
187 | acc_diff: i64, | 187 | acc_diff: i64, |
188 | } | 188 | } |
189 | 189 | ||
190 | impl<'a> Edits<'a> { | 190 | impl<'a> Edits<'a> { |
191 | fn from_text_edit(text_edit: &'a TextEdit) -> Edits<'a> { | 191 | fn from_text_edit(text_edit: &'a TextEdit) -> Edits<'a> { |
192 | let mut x = Edits { edits: text_edit.as_atoms(), current: None, acc_diff: 0 }; | 192 | let mut x = Edits { edits: text_edit.as_indels(), current: None, acc_diff: 0 }; |
193 | x.advance_edit(); | 193 | x.advance_edit(); |
194 | x | 194 | x |
195 | } | 195 | } |