Repository navigation
Impl String::into_chars - #133057
Impl String::into_chars#133057
Conversation
|
Failed to set assignee to
|
| None => None, | ||
| Some((_, ch)) => { | ||
| let offset = iter.offset(); | ||
| drop(self.bytes.drain(..offset)); |
There was a problem hiding this comment.
This reminds me of this thread that suggests a truncate_front method on Vec. Not sure if it's desired as a separate proposal.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
commented
Nov 15, 2024
|
Thanks for your review! It seems this direction is good to go. I'd create a tracking issue, update the attr in code and add docs with doctests, then request a review for merging. Hopefully in this week. |
|
This PR is ready for merge from my perspective. Ping @programmerjake @kennytm @Amanieu if you have time to give it a review :D I'd still wonder whether we'd add a String::into_char_indices method also? Seems intuitive and for symmetry. |
This comment has been minimized.
This comment has been minimized.
|
Looks good, aside from some small nits:
|
commented
Nov 17, 2024
|
@thaliaarchi Thank you! Comments addressed. |
This comment has been minimized.
This comment has been minimized.
commented
Dec 22, 2024
I've seen a number of PRs that were merged with multiple commits (e.g. just looking through |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: tison <wander4096@gmail.com>
commented
Jan 6, 2025
|
Hello @Amanieu! May we have another review around? |
commented
Jan 7, 2025
|
Sorry for the delay, I'm currently going through my PR review backlog. @bors r+ |
Tracking issue - #133125
r? @programmerjake @kennytm @Amanieu
This refers to rust-lang/libs-team#268
Before adding tests and creating a tracking issue, I'd like to reach a consensus on the implementation direction and two questions:
String::into_char_indicesmethod also?