-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Remove unzip() SizeHint hack #34155
Remove unzip() SizeHint hack #34155
Conversation
This was using an invalid iterator so is likely to end with buggy behaviour. It also doesn't even benefit many type in std including Vec so removing it shouldn't cause any problems.
(rust_highfive has picked a reviewer for you, use r? to override) |
I believe this was originally used to preallocate space in a The performance of |
I think @bluss will be excited to see this go! |
Yes! Cool hack, but it breaks the rules of an Iterator impl. |
A note from somewhere we discussed this previously: We can do a much better job with specialization anyway. |
+1 |
The libs team discussed this PR during triage today and the conclusion was to merge. Thanks again @ollie27! |
Remove unzip() SizeHint hack This was using an invalid iterator so is likely to end with buggy behaviour. It also doesn't even benefit many type in std including Vec so removing it shouldn't cause any problems. Fixes: #33468
This was using an invalid iterator so is likely to end with buggy
behaviour.
It also doesn't even benefit many type in std including Vec so removing it
shouldn't cause any problems.
Fixes: #33468