Skip to content

Change Iterator.size_hint() #7570

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

Closed
wants to merge 3 commits into from

Conversation

lilyball
Copy link
Contributor

@lilyball lilyball commented Jul 3, 2013

Change the signature of Iterator.size_hint() to always have a lower bound.

Implement .size_hint() on all remaining iterators (if it differs from the default).

@thestinger
Copy link
Contributor

@kballard: needs a rebase already

lilyball added 2 commits July 5, 2013 01:56
Remove the Option wrapper around the lower bound. None is semantically
the same as Size(0), so there's no point in having a distinction.
Every iterator adaptor now has an implementation of .size_hint() that
makes sense, except for when the default of (0, None) is correct.
@lilyball
Copy link
Contributor Author

lilyball commented Jul 5, 2013

@thestinger Rebased. r?

@lilyball
Copy link
Contributor Author

lilyball commented Jul 6, 2013

test tuple::tests::test_tuple ...
command timed out: 3600 seconds without output, attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=10232.426586

Add size_hint() to the Iterators in libextra and the Iterator in
libsyntax.

Skip deque for the moment, as it's being worked on elsewhere.
bors added a commit that referenced this pull request Jul 6, 2013
Change the signature of Iterator.size_hint() to always have a lower bound.

Implement .size_hint() on all remaining iterators (if it differs from the default).
@bors bors closed this Jul 6, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 8, 2021
Add the `derivable_impls` lint

Fix rust-lang#7550

changelog: Add new derivable_impls lint. mem_replace_with_default now covers non constructor cases.
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.

4 participants