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::as_str #98453

Closed
wants to merge 1 commit into from
Closed

Conversation

jplatte
Copy link
Contributor

@jplatte jplatte commented Jun 24, 2022

Blocked on #95644, for now I'm using the same API as available on SplitTerminator but this should probably not be merged as-is since that API is changing.

Just wanted to open this now as a means to propose having the same "remainder of non-iterated parts as a contiguous &str" API on Lines as on Split* (tracked in #77998).

I'm also curious whether you think it makes sense to implement it like this (reaching into the inner SplitTerminator of Map) or whether the Map should maybe be replaced? I found the code a little hard to follow at first given it uses Map instead of just (?) doing the same thing manually in the Iterator implementation.

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Jun 24, 2022
@rust-highfive
Copy link
Collaborator

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 24, 2022
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 24, 2022
@JohnCSimon JohnCSimon added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 8, 2022
@WaffleLapkin WaffleLapkin 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 3, 2023
@WaffleLapkin
Copy link
Member

fyi: #95644 got merged, so this is not blocked on it anymore (however this needs a rebase — #95644 changed the APIs that this PR uses).

@Dylan-DPC
Copy link
Member

@jplatte any updates on this pr?

@jplatte
Copy link
Contributor Author

jplatte commented Jan 19, 2023

Don't have much time right now, since it's a small thing I might be able to get to it soon though. If somebody else wants to take over that would be fine by me too, just please ping me so the work isn't duplicated.

@jplatte
Copy link
Contributor Author

jplatte commented Jan 30, 2023

Closing in favor of #107464. Thanks WaffleLapkin!

@jplatte jplatte closed this Jan 30, 2023
@jplatte jplatte deleted the str_lines_remainder branch January 30, 2023 15:03
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).
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).
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

7 participants