Uh oh!
There was an error while loading. Please reload this page.
collections: update docs of slice get() and friends - #38216
Conversation
rust-highfive
commented
Dec 7, 2016
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
frewsxcv
commented
Dec 7, 2016
Looks like Travis found an error in a doc example. |
There was a problem hiding this comment.
It might be more clear to spell out the overloading in more detail here -- that is, to say something like:
- If given a position, returns the element at that position of
Noneif out of bounds. - If given a range, returns the subslice corresponding to that range, or
Noneif out of bounds.
And similarly elsewhere.
Otherwise r=me once travis is happy.
There was a problem hiding this comment.
Tried to do that now without too much repetition. Let me know if you want the details in all the method docs.
There was a problem hiding this comment.
Huh? There are more instances of None without a link in the file. Does it have to be linked every time?
There was a problem hiding this comment.
Not to mention that every reference to None seems to be different. There's (all in non-std crates that get re-exported to std)
[`None`]: ../../std/option/enum.Option.html#variant.None
[`None`]: option/enum.Option.html#variant.None
[option]: ../../std/option/enum.Option.html
Which is the preferred one?
There was a problem hiding this comment.
The first one. And yes, every method/struct/enum/... should be linked. I'm currently fixing all this but when I see a PR, I try to enforce it there as well.
There was a problem hiding this comment.
Missing get url. Also, should be get().
There was a problem hiding this comment.
So that's just #method.get I assume?
birkenfeld
commented
Dec 15, 2016
ping? |
GuillaumeGomez
commented
Dec 15, 2016
Don't forget to ping people (just like you did) once you updated. :) Thanks for your work! @bors: r+ rollup |
bors
commented
Dec 15, 2016
📌 Commit 6a80241 has been approved by |
frewsxcv
commented
Dec 15, 2016
It looks like the |
frewsxcv
commented
Dec 15, 2016
@bors r- |
frewsxcv
commented
Dec 15, 2016
No need to hold these changes up for the links, so feel free to remove them. The doc links are very fragile right now and need improvement. |
There was a problem hiding this comment.
There is an extra "..". Should be: ../std/option/enum.Option.html#variant.None.
GuillaumeGomez
commented
Dec 15, 2016
Please fix the url. If this change doesn't work, then just remove them but I'd like to give it a try first. |
for the new SliceIndex trait. Also made the docs of the unchecked versions a bit clearer; they return a reference, not an "unsafe pointer".
Ok, updated. If it is still not ok, you got access to the branch. I think project owners can do these small fixups much quicker on their own. |
GuillaumeGomez
commented
Dec 16, 2016
Still broken urls. Well, let's just forget about them this time. I'll remove them from your PR in the next days (if you don't update it before). :) |
birkenfeld
commented
Dec 16, 2016
Aren't they now exactly how you said they should be? |
GuillaumeGomez
commented
Dec 16, 2016
Yes, but now they need a supplementary ".." it said it wasn't needed previously (take a look at the CI for the details). Since I can't explain this behaviour, let's just forget about the urls (even if it pains me a lot...). |
alexcrichton
commented
Jan 17, 2017
Closing due to inactivity, but feel free to resubmit with tests fixed! |
collections: update docs of slice get() and friends Resubmit of rust-lang#38216. r? @GuillaumeGomez BTW, instead of closing a PR just because it is old and the team member who offered to fix it up did not have the time to do so, why not ping them instead? (cc @alexcrichton)
for the new SliceIndex trait. Also made the docs of the unchecked
versions a bit clearer; they return a reference, not an "unsafe
pointer".