Uh oh!
There was an error while loading. Please reload this page.
Introduce <&[_]>::split_off and <&str>::split_off - #49173
Conversation
rust-highfive
commented
Mar 19, 2018
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @withoutboats (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Centril
commented
Mar 19, 2018
This seems nice to have 👍 |
+1-- I've written these a handful of times. I'd also like |
nox
commented
Mar 19, 2018
@cramertj I plan to make a separate PR for a more general "cutting" concept, with "anchored ranges". I'll probably do that at the end of the week. https://play.rust-lang.org/?gist=54e0077190f33596d9f8fa705bed0a66&version=nightly |
There was a problem hiding this comment.
This is trivially safe since an empty string slice is UTF-8 by definition, but a comment to that effect would be nice here ;)
(Generally I think all uses of unsafe elimination blocks should come with a comment explaining the reason why it is safe.)
There was a problem hiding this comment.
I finally added the damn comment. :3
cramertj
commented
Mar 28, 2018
ping @withoutboats |
nox
commented
Apr 5, 2018
@withoutboats Ping. |
SimonSapin
commented
Apr 9, 2018
The implementation looks fine to me but the |
alexcrichton
commented
Apr 9, 2018
The method name here could be shadowed by We've also got methods like |
bors
commented
Apr 12, 2018
☔ The latest upstream changes (presumably #49698) made this pull request unmergeable. Please resolve the merge conflicts. |
emilyalbini
commented
Apr 16, 2018
Ping from triage! Can @withoutboats (or someone else from @rust-lang/libs) review this? |
withoutboats
commented
Apr 16, 2018
Code looks good, I agree with Alex that the potential shadowing with the Vec API seems bad and it would be good to rename. In regard to @SimonSapin's point about the return type, I think this is just an example of the kinds of new APIs arbitrary_self_types enables. |
nox
commented
Apr 20, 2018
What should I rename them to? |
Centril
commented
Apr 20, 2018
@nox How about: |
nox
commented
Apr 20, 2018
I would expect such a method to set |
TimNN
commented
Apr 24, 2018
@nox / @alexcrichton: It looks like the main blocker here is deciding on names for the new methods. How do you want to move forward with this? If this does essentially the same as existing |
alexcrichton
commented
Apr 24, 2018
I don't have a particular personal preference on name, but I do think it just needs to be different |
emilyalbini
commented
Apr 30, 2018
Ping from triage! What's the status of this? |
alexcrichton
commented
Apr 30, 2018
Indeed! |
emilyalbini
commented
Apr 30, 2018
Sure. |
How about |
emilyalbini
commented
Jun 4, 2018
Ping from triage @nox@alexcrichton! What we should do with this PR? |
Centril
commented
Jun 4, 2018
I propose that we just pick one of the suboptimal names proposed for now and optimize it during stabilization; maybe we'll have better ideas by then? |
Centril
commented
Jun 4, 2018
Also; I noticed that |
shepmaster
commented
Jun 4, 2018
Can we say that explicitly in the docs somehow? "If you don't like this name, pop on over to #XXXXX and paint the bikeshed" |
Centril
commented
Jun 4, 2018
@shepmaster SGTM 👍 |
alexcrichton
commented
Jun 27, 2018
Looks like this hasn't been updated in awhile so I'm going to close, but feel free to resubmit of course! I think @Centril's idea above makes sense to me too! |
nox
commented
Jul 26, 2019
I completely forgot this PR. I'm currently doing a crate for slices represented as a pair of start and end pointers (like |
No description provided.