Skip to content

Commit a442475

Browse files
Fix off-by-one error in reindexing after reverse
1 parent 0e4a3a2 commit a442475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ impl<K, V> OrderMapCore<K, V> {
17721772
{
17731773
for pos in indices {
17741774
if let Some((i, _)) = pos.resolve::<Sz>() {
1775-
pos.set_pos::<Sz>(len - i);
1775+
pos.set_pos::<Sz>(len - i - 1);
17761776
}
17771777
}
17781778
}

0 commit comments

Comments
 (0)