Skip to content

Rename slice::take... methods to split_off... - #136555

Merged
bors merged 2 commits into
rust-lang:masterfrom
cramertj:split_off
Feb 6, 2025
Merged

bors merged 2 commits into
rust-lang:masterfrom
cramertj:split_off

Conversation

@cramertj

@cramertj cramertj commented Feb 4, 2025

Copy link
Copy Markdown
Member

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

rustbot commented Feb 4, 2025

Copy link
Copy Markdown
Collaborator

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

tgross35 commented Feb 4, 2025

Copy link
Copy Markdown
Member

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
3 of 7 tasks

@dtolnay dtolnay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@dtolnay

ghost commented Feb 5, 2025

Copy link
Copy Markdown
Member

@bors r+

@bors

ghost commented Feb 5, 2025

Copy link
Copy Markdown
Collaborator

📌 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
@@ -83,14 +83,12 @@ pub use raw::{from_raw_parts, from_raw_parts_mut};
/// which to split. Returns `None` if the split index would overflow.

ghost Feb 6, 2025 •

Copy link
Copy Markdown
Contributor

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
@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