move to to_usize()

This commit is contained in:
Veetaha 2020-02-10 01:57:43 +02:00
parent c48c0f370a
commit 139479e8a3
3 changed files with 6 additions and 6 deletions

View file

@ -29,8 +29,8 @@ impl AtomTextEdit {
}
pub fn apply(&self, mut text: String) -> String {
let start = u32::from(self.delete.start()) as usize;
let end = u32::from(self.delete.end()) as usize;
let start = self.delete.start().to_usize();
let end = self.delete.end().to_usize();
text.replace_range(start..end, &self.insert);
text
}