-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use get_unchecked in str::[r]split_once #89219
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
This seems reasonable to me. Do you have any examples of the improvements achieved by this change? |
Yes, I noticed that current implementation adds panic handling, then I found the reason of this. Godbolt comparison is here (link was edited for history). |
0ba4165
to
a35aaa2
Compare
I've removed redundant bounds in @rustbot label -S-waiting-on-author +S-waiting-on-review |
Thanks. I don't think it makes sense to edit unrelated code in this PR anyway. @bors r+ |
📌 Commit a35aaa2 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0c87288): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
This PR removes indices checking in
str::split_once
andstr::rsplit_once
methods.