Respect excerpt's range when comparing two anchors both belonging to it

This commit is contained in:
Antonio Scandurra
2022-03-11 12:42:22 +01:00
parent a067150b5a
commit c67cfd7fe1
3 changed files with 28 additions and 26 deletions
@@ -241,6 +241,14 @@ impl FoldMap {
self.buffer.lock().len(),
"transform tree does not match buffer's length"
);
let mut folds = self.folds.iter().peekable();
while let Some(fold) = folds.next() {
if let Some(next_fold) = folds.peek() {
let comparison = fold.0.cmp(&next_fold.0, &self.buffer.lock()).unwrap();
assert!(comparison.is_le());
}
}
}
}