-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Clean up and rename the HashSet iterators #19993
Conversation
So first commit -- what can be done. Second commit -- is mildly breaking and what I want to be done. :) |
53c7e52
to
b53c965
Compare
r? @huonw (will do myself in a few days if you don't) |
Wait I lied I did it in 8 hours. I'm fine with this breaking change because we need to rename basically every collection iterator anyway. Actually maybe we should just nip that in the bud right here: I believe all these iterators should be named after the method that creates them. SetItems -> Iter, DifferenceItems -> Difference, etc. |
For reference: https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#iterator-type-names (man it would be super cool if some real strong and brave developer went and implemented that...) |
If @bluss would be interested in renaming the iterators in HashSet as part of this PR, I'd be willing to go through the rest of collections and do the rest of the renaming work. |
@csouth3 This user on Reddit has expressed interest in maybe taking it on as a learning project: http://www.reddit.com/r/rust/comments/2prhid/rip_treemap_treeset_triemap_trieset_lrucache_and/cmziw9c You can collaborate with or mentor them on it. Since it's not necessarily a hard job (just really tedious), I'm inclined to give the newer contributor priority for learning and growth reasons. If we don't hear from them in a few days feel free to take point, though. |
Ah yes, please defer to the redditor (I'm also willing to mentor if desired). Otherwise, I'll just sit back and keep an eye on it for a few days :) |
@MrFloya is the reddit user. They have just contacted me on irc and are on the job! 💃 |
Sweet 😎 |
I'll do just the HashSet iterators and push a commit for that to this PR |
Updated to rename all HashSet iterators. I think I'd like to squash the three commits together after review. |
r=me with squash |
This removes the type SetAlgebraItems and replaces it with the structs Intersection and Difference. Rename the existing HashSet iterators according to RFC rust-lang#344: * SetItems -> Iter * SetMoveItems -> IntoIter * Remaining set combination iterators renamed to Union and SymmetricDifference [breaking-change]
25a4886
to
cf350ea
Compare
squashed and thank you |
@bluss Just occurred to me to ask: You made sure no one in all of the repo relies on the name of these types? |
Yes, it's still compiling, but I did grep around. |
Good enough for me :D |
You and me are mere mortals, bors has the final word :) |
This removes the type SetAlgebraItems and replaces it with the structs Intersection and Difference. Rename the existing HashSet iterators according to RFC rust-lang#344: * SetItems -> Iter * SetMoveItems -> IntoIter * Remaining set combination iterators renamed to Union and SymmetricDifference
This removes the type SetAlgebraItems and replaces it with the
structs Intersection and Difference.
Rename the existing HashSet iterators according to RFC #344: