diff options
Diffstat (limited to 'crates/ra_text_edit/src/lib.rs')
-rw-r--r-- | crates/ra_text_edit/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_text_edit/src/lib.rs b/crates/ra_text_edit/src/lib.rs index 5f1b12222..37f23d043 100644 --- a/crates/ra_text_edit/src/lib.rs +++ b/crates/ra_text_edit/src/lib.rs | |||
@@ -29,8 +29,8 @@ impl AtomTextEdit { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | pub fn apply(&self, mut text: String) -> String { | 31 | pub fn apply(&self, mut text: String) -> String { |
32 | let start = u32::from(self.delete.start()) as usize; | 32 | let start = self.delete.start().to_usize(); |
33 | let end = u32::from(self.delete.end()) as usize; | 33 | let end = self.delete.end().to_usize(); |
34 | text.replace_range(start..end, &self.insert); | 34 | text.replace_range(start..end, &self.insert); |
35 | text | 35 | text |
36 | } | 36 | } |