Skip to content

Conversation

@cramertj
Copy link
Member

@cramertj cramertj commented Feb 4, 2025

This rename was discussed and recommended in a recent t-libs meeting.

cc #62280

There's an additional commit here which modifies internals of unstable OneSidedRange APIs in order to implement split_off methods in a panic-free way (remove unreachable!()) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 4, 2025
@tgross35
Copy link
Contributor

tgross35 commented Feb 4, 2025

Discussion for reference https://hackmd.io/xLRjfOA4Twy3_nEzXv7gcQ#nominated-rusttf62280-Tracking-issue-for-slice_take. I'll take a look soon.

@dtolnay dtolnay mentioned this pull request Feb 5, 2025
7 tasks
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dtolnay
Copy link
Member

dtolnay commented Feb 5, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 5, 2025

📌 Commit 836a989 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2025
@dtolnay dtolnay assigned dtolnay and unassigned tgross35 Feb 5, 2025
///
/// This is a helper function for `take` and `take_mut` that returns
/// the direction of the split (front or back) as well as the index at
/// which to split. Returns `None` if the split index would overflow.
Copy link
Contributor

@thaliaarchi thaliaarchi Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, you missed the take and take_mut in this comment (not able to be shown in the snippet).

@bors bors merged commit fd4623b into rust-lang:master Feb 6, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 6, 2025
@cramertj cramertj deleted the split_off branch February 6, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants