-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Iterator::single #55360
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Iterator::single #55360
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This appears to be a duplicate of #55355 |
I proposed an idea, someone said to me that I should submit a PR, so it took me long to tame the compiler build system and to add my implementation; and then someone else did the PR 2 hours before mine. He could have at least notified me that he was doing the job before that. That's no incentive for me to contribute any more. |
Yeah this happens from time to time. It might have been a good idea to explicitly state that you're working on this in the internals thread. |
I'll do it next time. Thanks for the advice. |
Hi, I wrote there about an idea I had, and everybody seemed to see this as a good idea. So here is my PR for
Iterator::single
: this method returnsSome(item)
if this item is single in the iterator, otherwise it returnsNone
. What do you think of this?This is my first contribution, so I'm not aware of how it works. For example, I do not know what to put in the issue field of the
unstable
attribute. I'm waiting for your comments/suggestions!