Skip to content

Commit 002cd53

Browse files
committed
Auto merge of #150076 - heathdutton:fix-linked-list-cursor-pop-front-index, r=Mark-Simulacrum
Fix `LinkedList::CursorMut::pop_front` to correctly update index When `pop_front` was called while the cursor pointed to the front element, `move_next` incremented the index but it was never decremented afterwards, causing the index to incorrectly report 1 instead of 0. Always decrement the index after popping from front using `saturating_sub` to handle edge cases safely. Fixes rust-lang/rust#147616
2 parents 771060b + e675d6d commit 002cd53

0 file changed

File tree

    0 commit comments

    Comments
     (0)