Uh oh!
There was an error while loading. Please reload this page.
Explain meaning of Result iters and link to factory functions - #38158
Conversation
rust-highfive
commented
Dec 4, 2016
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
bluss
commented
Dec 4, 2016
@bors r+ rollup Thank you! |
bors
commented
Dec 4, 2016
📌 Commit b2849c7 has been approved by |
There was a problem hiding this comment.
I'll add them - it wasn't clear to me if the intention is to link every reference...
GuillaumeGomez
commented
Dec 7, 2016
@bors: r- |
sourcefrog
commented
Dec 11, 2016
links added, please take another look |
sourcefrog
commented
Dec 11, 2016
I'm not sure why https://travis-ci.org/rust-lang/rust/jobs/183046022 failed, maybe just a glitch? |
GuillaumeGomez
commented
Dec 11, 2016
Don't worry, travis build is broken for the moment, so if no error/failed test, it's good. Can you squash your commits please? If you don't know how to do it, take a look here. Once done, ping me and I merge. |
sourcefrog
commented
Dec 13, 2016
Will do. Should we teach Bors to squash-and-merge? |
Squashed, and rebased to current master. |
| /// Returns a consuming iterator over the possibly contained value. | ||
| /// | ||
| /// The iterator yields one value if the result is [`Ok`], otherwise none. |
| /// Returns an iterator over the possibly contained value. | ||
| /// | ||
| /// The iterator yields one value if the result is [`Ok`], otherwise none. |
There was a problem hiding this comment.
Well, no, it doesn't yield None, it just yields no values at all.
I realize this is implemented by next() returning None but I think saying that would only make this confusing. I could rephrase it as "the iterator's next method returns Some of the inner and then None if the result is Ok, otherwise it returns None." But that seems to be needlessly puncturing the iterator abstraction.
A couple of general comments:
There are lots of references to well-known types such as
NoneandOkthroughout the code without hyperlinks, indeed even in this very file. If the goal is that every type be manually linked maybe that should go intoCONTRIBUTING.mdto avoid make that clear. IMO it is not so necessary to linkify values the reader is highly likely to already understand, and that anyhow are linked from nearby.In my experience repeatedly asking contributors for small incremental changes to a PR that's already an improvement tends to discourage future contributions. My normal practice now is to accept the change and encourage them to send another PR making additional cleanups, and I think this gives them a better feeling about contributing.
There was a problem hiding this comment.
No, it returns None, not "no values at all".
Also, I'm currently finishing to add missing doc examples, then I'll go through all missing urls. None and every other struct/enum/etc... should be linked.
Also, even it seems minor for you, it isn't for me since all these minor things people don't add, I have to after. And it's getting quite huge.
I don't ask it just to bother you or for extreme and dark reasons, it's really because there is a need out of it.
There was a problem hiding this comment.
Unless I'm misunderstanding it the iter will either have length 1 and contain the value inside the Ok result, or it will have length zero. It never yields None, unless the result is Ok(None). That's what I was trying to say by it yields 'no values at all'.
https://play.rust-lang.org/?gist=3d6a9500b782e878fae356a08888838b&version=stable&backtrace=0
There was a problem hiding this comment.
Ok, I see your point. Confusion on my side. Sorry about that... Therefore, no change is needed.
There was a problem hiding this comment.
No problem, I could have been confused myself so I appreciate you checking.
I can send you a little cleanup pr later to linkify other instances. It sure would be nice if we can make it automatic later.
There was a problem hiding this comment.
It's been discussed for a while. You can take a look at this issue if you want to take a look at the current status.
| /// Returns a mutable iterator over the possibly contained value. | ||
| /// | ||
| /// The iterator yields one value if the result is [`Ok`], otherwise none. |
| /// An iterator over a reference to the [`Ok`] variant of a [`Result`]. | ||
| /// | ||
| /// The iterator yields one value if the result is [`Ok`], otherwise none. |
| /// the [`IntoIterator`] trait). | ||
| /// An iterator over the value in a [`Ok`] variant of a [`Result`]. | ||
| /// | ||
| /// The iterator yields one value if the result is [`Ok`], otherwise none. |
GuillaumeGomez
commented
Dec 15, 2016
@bors: r+ rollup |
bors
commented
Dec 15, 2016
📌 Commit 16d4b7b has been approved by |
Explain meaning of Result iters and link to factory functions
Explain meaning of Result iters and link to factory functions
bors
commented
Dec 16, 2016
⌛ Testing commit 16d4b7b with merge 02bb808... |
bors
commented
Dec 16, 2016
💔 Test failed - auto-win-msvc-64-opt |
GuillaumeGomez
commented
Dec 16, 2016
@bors: retry |
bors
commented
Dec 16, 2016
⌛ Testing commit 16d4b7b with merge f5fa85e... |
bors
commented
Dec 16, 2016
💔 Test failed - auto-mac-64-opt-rustbuild |
alexcrichton
commented
Dec 16, 2016
via email
@bors: retry …On Fri, Dec 16, 2016 at 7:54 AM, bors ***@***.***> wrote:
💔 Test failed - auto-mac-64-opt-rustbuild
<https://buildbot.rust-lang.org/builders/auto-mac-64-opt-rustbuild/builds/3275>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#38158 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95GmHrclijQ3hIO3cl2XcXETlONVdks5rIrRBgaJpZM4LDokl>
.
|
Explain meaning of Result iters and link to factory functions
sanxiyn
commented
Dec 19, 2016
@bors retry |
alexcrichton
commented
Dec 20, 2016
@bors: retry |
Explain meaning of Result iters and link to factory functions
Rollup of 29 pull requests - Successful merges: #37761, #38006, #38131, #38150, #38158, #38171, #38208, #38215, #38236, #38245, #38289, #38302, #38315, #38346, #38388, #38395, #38398, #38418, #38432, #38451, #38463, #38468, #38470, #38471, #38472, #38478, #38486, #38493, #38498 - Failed merges: #38271, #38483
No description provided.