mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
move to to_usize()
This commit is contained in:
parent
c48c0f370a
commit
139479e8a3
3 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue