-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rename Iterators
invert()
method to something shorter, like flip()
#10632
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
Comments
If we do this, we should rename |
Sure, the type names will be adjusted to. I personally think |
Why not something like |
I would expect |
I meant a |
@LeoTestard reverse is a bad name because this method does not reverse the iterator. :P A double ended iterator has two ends, and iterating with |
I prefer the name |
I like |
@wting: |
There's already a |
A better name for the in-place version could be |
|
Should it perhaps be something like |
+1 for |
@kud1ing: Thanks for the correction and the multi-language comparison. My vote is for |
…632, r=alexcrichton Renamed the ```invert()``` function in ```iter.rs``` to ```flip()```, from #10632 Also renamed the ```Invert<T>``` type to ```Flip<T>```. Some related code comments changed. Documentation that I could find has been updated, and all the instances I could locate where the function/type were called have been updated as well. This is my first contribution to Rust! Apologies in advance if I've snarfed the PR process, I'm not used to rebase. I initially had issues with the ```codegen``` section of the tests failing, however the ```make check``` process is not reporting any failures at this time. I think that was a local env issue more than me facerolling my changes. :)
Add `needless_maybe_sized` lint changelog: new lint: [`needless_maybe_sized`] Closes rust-lang#10600
The docs for it already read as "Flip the direction of the iterator", and it's a shorter name.
The length, at the very least, becomes important if we decide to do something like #9391, because then using
invert
would become the common way to iterater over values in reverse. Compare:Imo, the meaning also becomes marginally more clear that way.
The text was updated successfully, but these errors were encountered: