Skip to content
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

core: introduce split_at{,_mut}_checked #118578

Merged
merged 2 commits into from
Jan 22, 2024
Merged

core: introduce split_at{,_mut}_checked #118578

merged 2 commits into from
Jan 22, 2024

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Dec 3, 2023

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut respectively. This is analogous to get method being
non-panicking version of indexing.

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2023

r? @m-ou-se

(rustbot has picked a reviewer for you, use r? to override)

@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 Dec 3, 2023
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@workingjubilee workingjubilee added S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 3, 2023
@mina86 mina86 changed the title core: introduce checked_split_at{,_mut} core: introduce split_at{,_mut}_checked Dec 19, 2023
@mina86
Copy link
Contributor Author

mina86 commented Dec 28, 2023

@rustbot label -S-waiting-on-ACP +S-waiting-on-review

@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2023

Failed to set assignee to label: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. labels Dec 28, 2023
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

Looks pretty good, mostly docs

library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
///
/// Returns `None` if `mid > len`.
///
/// # Examples
Copy link
Contributor

Choose a reason for hiding this comment

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

I seem to recall a PR that removed a lot of # Examples headers whenever there was only one example, but it doesn't really matter (I know this is consistent)

library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/str/mod.rs Outdated Show resolved Hide resolved
library/core/src/str/mod.rs Outdated Show resolved Hide resolved
@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 10, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2024

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git rebase -i master
$ # delete any merge commits in the editor that appears
$ git push --force-with-lease

The following commits are merge commits:

@bors
Copy link
Contributor

bors commented Jan 20, 2024

☔ The latest upstream changes (presumably #120136) made this pull request unmergeable. Please resolve the merge conflicts.

@tgross35
Copy link
Contributor

@mina86 comment @rustbot ready whenever you are ready for a re-review (you'll have to rebase and squash your commits before merge still)

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut  respectively.  This is analogous to get method being
non-panicking version of indexing.
@mina86
Copy link
Contributor Author

mina86 commented Jan 20, 2024

@rustbot ready

@dtolnay dtolnay assigned dtolnay and unassigned m-ou-se Jan 21, 2024
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
library/core/src/str/mod.rs Outdated Show resolved Hide resolved
library/core/src/str/mod.rs Outdated Show resolved Hide resolved
library/core/src/slice/mod.rs Outdated Show resolved Hide resolved
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 21, 2024
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.

Thanks!

@dtolnay
Copy link
Member

dtolnay commented Jan 21, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 21, 2024

📌 Commit 50cbbef 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 21, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2024
core: introduce split_at{,_mut}_checked

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut  respectively.  This is analogous to get method being
non-panicking version of indexing.

- rust-lang/libs-team#308
- rust-lang#119128
@bors
Copy link
Contributor

bors commented Jan 22, 2024

⌛ Testing commit 50cbbef with merge e99b66b...

@bors
Copy link
Contributor

bors commented Jan 22, 2024

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 22, 2024
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@dtolnay
Copy link
Member

dtolnay commented Jan 22, 2024

@bors retry

@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 Jan 22, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 22, 2024
core: introduce split_at{,_mut}_checked

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut  respectively.  This is analogous to get method being
non-panicking version of indexing.

- rust-lang/libs-team#308
- rust-lang#119128
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 22, 2024
core: introduce split_at{,_mut}_checked

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut  respectively.  This is analogous to get method being
non-panicking version of indexing.

- rust-lang/libs-team#308
- rust-lang#119128
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#118578 (core: introduce split_at{,_mut}_checked)
 - rust-lang#119369 (exclude unexported macro bindings from extern crate)
 - rust-lang#119408 (xous: misc fixes + add network support)
 - rust-lang#119943 (std::net: bind update for using backlog as `-1` too.)
 - rust-lang#119948 (Make `unsafe_op_in_unsafe_fn` migrated in edition 2024)
 - rust-lang#119999 (remote-test: use u64 to represent file size)
 - rust-lang#120152 (add help message for `exclusive_range_pattern` error)
 - rust-lang#120213 (Don't actually make bound ty/const for RTN)
 - rust-lang#120225 (Fix -Zremap-path-scope typo)

Failed merges:

 - rust-lang#119972 (Add `ErrCode`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 99b4f80 into rust-lang:master Jan 22, 2024
11 of 12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 22, 2024
Rollup merge of rust-lang#118578 - mina86:c, r=dtolnay

core: introduce split_at{,_mut}_checked

Introduce split_at_checked and split_at_mut_checked methods to slices
types (including str) which are non-panicking versions of split_at and
split_at_mut  respectively.  This is analogous to get method being
non-panicking version of indexing.

- rust-lang/libs-team#308
- rust-lang#119128
@mina86 mina86 deleted the c branch January 27, 2024 06:46
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.

8 participants