Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add as_slice and as_mut_slice to smallvec::IntoIter #181

Closed
rklaehn opened this issue Nov 16, 2019 · 2 comments
Closed

Add as_slice and as_mut_slice to smallvec::IntoIter #181

rklaehn opened this issue Nov 16, 2019 · 2 comments

Comments

@rklaehn
Copy link
Contributor

rklaehn commented Nov 16, 2019

SmallVec is mostly a drop in replacement for Vec. There are two methods on std::vec::IntoIter that allow random access on the remainder of the iterator: as_slice and as_mut_slice.

These are missing in SmallVec, but implementing them would be rather easy.

rklaehn added a commit to rklaehn/rust-smallvec that referenced this issue Nov 16, 2019
To allow random access for remaining data in smallvec::IntoIter, just like
std::vec::IntoIter

Implements servo#181
@rklaehn
Copy link
Contributor Author

rklaehn commented Nov 16, 2019

I gave it a shot...

bors-servo pushed a commit that referenced this issue Nov 16, 2019
Add as_slice and as_mut_slice methods

To allow random access for remaining data in smallvec::IntoIter, just like
std::vec::IntoIter

Implements #181
@emilio
Copy link
Member

emilio commented Nov 19, 2019

Fixed by #182, thanks!

@emilio emilio closed this as completed Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants