Skip to content

Commit

Permalink
Auto merge of #95644 - WaffleLapkin:str_split_as_str_refactor_take2, …
Browse files Browse the repository at this point in the history
…r=Amanieu

`Split*::as_str` refactor

I've made this patch almost a year ago, so the rename and the behavior change are in one commit, sorry 😅

This fixes #84974, as it's required to make other changes work.

This PR
- Renames `as_str` method of string `Split*` iterators to `remainder` (it seems like the `as_str` name was confusing to users)
- Makes `remainder` return `Option<&str>`, to distinguish between "the iterator is exhausted" and "the tail is empty", this was [required on the tracking issue](rust-lang/rust#77998 (comment))

r? `@m-ou-se`
  • Loading branch information
bors committed Jan 3, 2023
2 parents 1631b91 + a34a0c9 commit 2b960b1
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 2b960b1

Please sign in to comment.