-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Split*::as_str
refactor
#95644
Split*::as_str
refactor
#95644
Conversation
b52f35b
to
13bc86d
Compare
☔ The latest upstream changes (presumably #104655) made this pull request unmergeable. Please resolve the merge conflicts. |
This commit - Renames `Split*::{as_str -> remainder}` as it seems less confusing - Makes `remainder` return Option<&str> to distinguish between "iterator is exhausted" and "the tail is empty"
13bc86d
to
b458a49
Compare
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? libs-api |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (b435960): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
See rust-lang/rust/pull/95644 Signed-off-by: Neil Shen <overvenus@gmail.com>
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
as_str
method of stringSplit*
iterators toremainder
(it seems like theas_str
name was confusing to users)remainder
returnOption<&str>
, to distinguish between "the iterator is exhausted" and "the tail is empty", this was required on the tracking issuer? @m-ou-se