aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/edit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src/edit.rs')
-rw-r--r--crates/ra_editor/src/edit.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_editor/src/edit.rs b/crates/ra_editor/src/edit.rs
index c3149ec54..372b8d14c 100644
--- a/crates/ra_editor/src/edit.rs
+++ b/crates/ra_editor/src/edit.rs
@@ -26,7 +26,7 @@ impl EditBuilder {
26 } 26 }
27 pub fn finish(self) -> Edit { 27 pub fn finish(self) -> Edit {
28 let mut atoms = self.atoms; 28 let mut atoms = self.atoms;
29 atoms.sort_by_key(|a| a.delete.start()); 29 atoms.sort_by_key(|a| (a.delete.start(), a.delete.end()));
30 for (a1, a2) in atoms.iter().zip(atoms.iter().skip(1)) { 30 for (a1, a2) in atoms.iter().zip(atoms.iter().skip(1)) {
31 assert!(a1.delete.end() <= a2.delete.start()) 31 assert!(a1.delete.end() <= a2.delete.start())
32 } 32 }