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

Override Iterator::count method for vec::IntoIter #25047

Merged
merged 1 commit into from
May 4, 2015

Conversation

sinkuu
Copy link
Contributor

@sinkuu sinkuu commented May 2, 2015

Override methods count, last, and nth in vec::IntoIter.
#24214

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@nwin
Copy link
Contributor

nwin commented May 2, 2015

If I’m not mistaken last will lead to a double-free of the last element and nth will leak everything until n.

@sinkuu
Copy link
Contributor Author

sinkuu commented May 2, 2015

@nwin Oops. Thanks for pointing that out! I'll update this pull request to override only count.

@sinkuu sinkuu changed the title Override Iterator methods for vec::IntoIter Override Iterator::count method for vec::IntoIter May 2, 2015
@alexcrichton
Copy link
Member

@bors: r+ 5d8431c rollup

Thanks!

bors added a commit that referenced this pull request May 4, 2015
Override methods `count`, `last`, and `nth` in vec::IntoIter.

#24214
@bors
Copy link
Contributor

bors commented May 4, 2015

⌛ Testing commit 5d8431c with merge 6517a0e...

@bors bors merged commit 5d8431c into rust-lang:master May 4, 2015
@sinkuu sinkuu deleted the vec_intoiter_override branch July 8, 2019 12:01
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

Successfully merging this pull request may close these issues.

5 participants