Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #137 - mbrubeck:extend, r=jdm
Don't leak on panic in extend This ensures that the length of the SmallVec is updated even if the iterator panics in `next`. This uses `SetLenOnDrop` rather than setting the length inside the loop, because otherwise this suffers from the same optimization issue as rust-lang/rust#36355. Fixes #136. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-smallvec/137) <!-- Reviewable:end -->
- Loading branch information