-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Return the delimiter from slice::split_once #119799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return the delimiter from slice::split_once #119799
Conversation
This is a departure from the str::split_once API that the slice methods were based on. The justification is that for arbitrary T, the split element and be complex and the relationship between the split element and the predicate can be more indirect than with typical str patterns.
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
Marking this as a draft, since there was another good proposal for the api here: #112811 (comment). |
I think we'll need an API member to weigh in on this. @rustbot label -T-libc +T-libs-api |
r? libs-api |
We discussed this in a previous libs-api meeting. Finding the delimiter in slices is relatively easy to do using On the other hand, Perhaps a better avenue would be to explore a new API on |
@rfcbot fcp close |
Team member @Amanieu has proposed to close this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to close, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
This is a breaking change to the unstable
slice_split_once
feature. It was originally proposed in #112811 (comment).This would be a departure from the
str::split_once
API that theslice_split_once
methods were based on. The justification is that for arbitraryT
, the split element and be complex and the relationship between the split element and the predicate can be more indirect than with typical str patterns.