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

Small correctness improvement if next() throws. #142

Merged
merged 1 commit into from
Mar 4, 2017

Conversation

JakeWharton
Copy link
Collaborator

No description provided.

@pforhan
Copy link
Contributor

pforhan commented Mar 2, 2017

Testable? Otherwise LGTM.

@JakeWharton
Copy link
Collaborator Author

It's not really important to test because once the iterator throws at all it's dead. Using it after that is undefined behavior. I can trigger the throw in a test, but there's no good way to test that its internal bookkeeping remains accurate that I can tell.

@f2prateek
Copy link
Collaborator

LGTM!

@f2prateek f2prateek merged commit e857fd9 into master Mar 4, 2017
@f2prateek f2prateek deleted the jw/2017-03-01/correctness branch March 4, 2017 04:14
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.

3 participants