Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Iterator::single #55360

wants to merge 1 commit into from

Conversation

real-felix
Copy link

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 returns Some(item) if this item is single in the iterator, otherwise it returns None. 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!

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 25, 2018
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:10b39898:start=1540498386240094100,finish=1540498472821117132,duration=86581023032
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
---
[00:04:07] tidy error: /checkout/src/libcore/iter/iterator.rs:611: trailing whitespace
[00:04:08] some tidy checks failed
[00:04:08] 
[00:04:08] 
[00:04:08] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:04:08] 
[00:04:08] 
[00:04:08] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:04:08] Build completed unsuccessfully in 0:00:44
[00:04:08] Build completed unsuccessfully in 0:00:44
[00:04:08] make: *** [tidy] Error 1
[00:04:08] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:28306823
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:099e21d0:start=1540498731325761039,finish=1540498731330051626,duration=4290587
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:3ac6d9be
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:1ca70a78
travis_time:start:1ca70a78
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:15a3f7cc
$ dmesg | grep -i kill

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 @TimNN. (Feature Requests)

@jonas-schievink
Copy link
Contributor

This appears to be a duplicate of #55355

@rust-lang rust-lang deleted a comment from rust-highfive Oct 25, 2018
@real-felix
Copy link
Author

real-felix commented Oct 26, 2018

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.

@jonas-schievink
Copy link
Contributor

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.

@real-felix real-felix closed this Oct 26, 2018
@real-felix
Copy link
Author

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants