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::repeatwould be used to repeat a string or a char to take a specific count of it and then collect it into aStringwhenstr::repeatis actually much faster and better for that.See also: rust-lang/rust-clippy#7260.