|
|
@ -378,7 +378,9 @@ impl ChangeSet {
|
|
|
|
macro_rules! map {
|
|
|
|
macro_rules! map {
|
|
|
|
($map: expr, $i: expr) => {
|
|
|
|
($map: expr, $i: expr) => {
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
|
let Some((pos, assoc)) = positions.peek_mut() else { return; };
|
|
|
|
let Some((pos, assoc)) = positions.peek_mut() else {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
};
|
|
|
|
if **pos < old_pos {
|
|
|
|
if **pos < old_pos {
|
|
|
|
// Positions are not sorted, revert to the last Operation that
|
|
|
|
// Positions are not sorted, revert to the last Operation that
|
|
|
|
// contains this position and continue iterating from there.
|
|
|
|
// contains this position and continue iterating from there.
|
|
|
@ -405,7 +407,9 @@ impl ChangeSet {
|
|
|
|
debug_assert!(old_pos <= **pos, "Reverse Iter across changeset works");
|
|
|
|
debug_assert!(old_pos <= **pos, "Reverse Iter across changeset works");
|
|
|
|
continue 'outer;
|
|
|
|
continue 'outer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let Some(new_pos) = $map(**pos, *assoc) else { break; };
|
|
|
|
let Some(new_pos) = $map(**pos, *assoc) else {
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
};
|
|
|
|
**pos = new_pos;
|
|
|
|
**pos = new_pos;
|
|
|
|
positions.next();
|
|
|
|
positions.next();
|
|
|
|
}
|
|
|
|
}
|
|
|
|