-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Replace some std::iter::repeat
with str::repeat
#85538
Conversation
Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
@bors r+ rollup=never |
📌 Commit edd38a936d1dec1d3fe5c4857185ccd21c44d1b3 has been approved by |
@bors r- |
Please squash out the merge(?) commit. |
Done. I just realized that the changes I made in |
That directory is synced both ways, changes to it are fine to make here. |
☔ The latest upstream changes (presumably #85954) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ rollup=never |
📌 Commit c08ea17 has been approved by |
☀️ Test successful - checks-actions |
Replace some `std::iter::repeat` with `str::repeat` I noticed that there were some instances where `std::iter::repeat` would be used to repeat a string or a char to take a specific count of it and then collect it into a `String` when `str::repeat` is actually much faster and better for that. See also: rust-lang/rust-clippy#7260.
I noticed that there were some instances where
std::iter::repeat
would be used to repeat a string or a char to take a specific count of it and then collect it into aString
whenstr::repeat
is actually much faster and better for that.See also: rust-lang/rust-clippy#7260.