fix(sliding-sync): ensure last index is also invalidated

Index ranges are inclusive, but our loop would stop one short. This particuarly
tricky when the selective view is moved, as we didn't properly invalidate all items.
This commit is contained in:
Benjamin Kampmann
2023-01-09 18:54:24 +01:00
committed by Benjamin Kampmann
parent 58aec0d126
commit 514530c19a

View File

@@ -1419,7 +1419,9 @@ impl SlidingSyncView {
));
}
while pos < end {
// ranges are inclusive up to the last index. e.g. `[0, 10]`; `[0, 0]`.
// ensure we pick them all up
while pos <= end {
if pos as usize >= max_len {
break; // how does this happen?
}