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

Add str::Lines::remainder #107464

Merged
merged 1 commit into from
Jan 26, 2024
Merged

Conversation

WaffleLapkin
Copy link
Member

Based on #98453.

This PR adds str::Lines::remainder similarly to other remainder function on str split iterators.

@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2023

r? @thomcc

(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 Jan 30, 2023
@rustbot

This comment was marked as resolved.

@WaffleLapkin WaffleLapkin added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 30, 2023
@jplatte jplatte mentioned this pull request Jan 30, 2023
@thomcc
Copy link
Member

thomcc commented Jan 30, 2023

ACP? (Or reason this doesn't need one?)

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 30, 2023
@WaffleLapkin
Copy link
Member Author

My point is that this is almost identical to other unstable APIs we have, see #77998, it was just missed by me originally when adding those, that Lines also is an iterator that splits strings.

@thomcc
Copy link
Member

thomcc commented Jan 31, 2023

Yeah, I'm not libs-api, I can't approve API changes without an ACP, sorry.

@thomcc
Copy link
Member

thomcc commented Jan 31, 2023

I agree it seems like a good idea and a natural fit.

@WaffleLapkin
Copy link
Member Author

Filled an ACP: rust-lang/libs-team#171

@JohnCSimon JohnCSimon added the S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. label Apr 30, 2023
@JohnCSimon
Copy link
Member

I'm assuming this is still waiting on ACP.

@pitaj pitaj removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 30, 2023
@pitaj
Copy link
Contributor

pitaj commented Apr 30, 2023

Personally, I don't think this needs to wait on a separate ACP given the existing, similar, unstable features. It's very similar to SplitWhitespace::remainder.

@dtolnay dtolnay assigned dtolnay and unassigned thomcc Jan 26, 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.

This looks good to me. Thank you!

@dtolnay
Copy link
Member

dtolnay commented Jan 26, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jan 26, 2024

📌 Commit cce93f0 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 26, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2024
…ines, r=dtolnay

Add `str::Lines::remainder`

Based on rust-lang#98453.

This PR adds `str::Lines::remainder` similarly to [other remainder function on str split iterators](rust-lang#77998).
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#107464 (Add `str::Lines::remainder`)
 - rust-lang#118803 (Add the `min_exhaustive_patterns` feature gate)
 - rust-lang#119466 (Initial implementation of `str::from_raw_parts[_mut]`)
 - rust-lang#120053 (Specialize `Bytes` on `StdinLock<'_>`)
 - rust-lang#120124 (Split assembly tests for ELF and MachO)
 - rust-lang#120204 (Builtin macros effectively have implicit #[collapse_debuginfo(yes)])
 - rust-lang#120322 (Don't manually resolve async closures in `rustc_resolve`)
 - rust-lang#120356 (Fix broken markdown in csky-unknown-linux-gnuabiv2.md)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#107464 (Add `str::Lines::remainder`)
 - rust-lang#118803 (Add the `min_exhaustive_patterns` feature gate)
 - rust-lang#119466 (Initial implementation of `str::from_raw_parts[_mut]`)
 - rust-lang#120053 (Specialize `Bytes` on `StdinLock<'_>`)
 - rust-lang#120124 (Split assembly tests for ELF and MachO)
 - rust-lang#120204 (Builtin macros effectively have implicit #[collapse_debuginfo(yes)])
 - rust-lang#120322 (Don't manually resolve async closures in `rustc_resolve`)
 - rust-lang#120356 (Fix broken markdown in csky-unknown-linux-gnuabiv2.md)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c0992f5 into rust-lang:master Jan 26, 2024
@rustbot rustbot added this to the 1.77.0 milestone Jan 26, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2024
Rollup merge of rust-lang#107464 - WaffleLapkin:all_that_remains_of_lines, r=dtolnay

Add `str::Lines::remainder`

Based on rust-lang#98453.

This PR adds `str::Lines::remainder` similarly to [other remainder function on str split iterators](rust-lang#77998).
@WaffleLapkin WaffleLapkin deleted the all_that_remains_of_lines branch January 26, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants