Skip to content

creader: Remove extraenous String::clone #141732

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

osiewicz
Copy link
Contributor

@osiewicz osiewicz commented May 29, 2025

A leftover from #132910

@rustbot
Copy link
Collaborator

rustbot commented May 29, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 29, 2025
@Kobzol
Copy link
Contributor

Kobzol commented May 29, 2025

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented May 29, 2025

📌 Commit 8c8d2c2 has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 29, 2025
@@ -435,7 +435,7 @@ impl<'a> CrateLocator<'a> {
info!("lib candidate: {}", spf.path.display());

let (rlibs, rmetas, dylibs, interfaces) =
candidates.entry(hash.to_string()).or_default();
candidates.entry(hash).or_default();
{
// As a perforamnce optimisation we canonicalize the path and skip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes me notice the typos in this paragraph 👀.

@lqd
Copy link
Member

lqd commented May 29, 2025

btw is this allocation visible in zed profiles, or the new large-workspace benchmark, or is it just a cleanup?

@osiewicz
Copy link
Contributor Author

osiewicz commented May 29, 2025

It's just a cleanup. I haven't measured it, but I don't expect it to show up in any profiles.

@lqd
Copy link
Member

lqd commented May 29, 2025

@bors rollup

@lqd
Copy link
Member

lqd commented May 29, 2025

It's just a cleanup. I haven't measured it, but I don't expect it to show up in any profiles.

Good to know. I asked because there were other allocations for the prefixes in this function that looked possibly optimizable.

bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request May 29, 2025
Rollup of 11 pull requests

Successful merges:

 - #137574 (Make `std/src/num` mirror `core/src/num`)
 - #141384 (Enable review queue tracking)
 - #141448 (A variety of improvements to the codegen backends)
 - #141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - #141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - #141705 (Add eslint as part of `tidy` run)
 - #141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - #141723 (Provide secrets to try builds with new bors)
 - #141728 (Fix false documentation of FnCtxt::diverges)
 - #141729 (resolve target-libdir directly from rustc)
 - #141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 18646a8 into rust-lang:master May 30, 2025
9 checks passed
rust-timer added a commit that referenced this pull request May 30, 2025
Rollup merge of #141732 - osiewicz:creader-remove-extraenous-string-clone, r=Kobzol

creader: Remove extraenous String::clone

A leftover from #132910
@rustbot rustbot added this to the 1.89.0 milestone May 30, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jun 3, 2025
…llaumeGomez

Rollup of 11 pull requests

Successful merges:

 - rust-lang#137574 (Make `std/src/num` mirror `core/src/num`)
 - rust-lang#141384 (Enable review queue tracking)
 - rust-lang#141448 (A variety of improvements to the codegen backends)
 - rust-lang#141636 (avoid some usages of `&mut P<T>` in AST visitors)
 - rust-lang#141676 (float: Disable `total_cmp` sNaN tests for `f16`)
 - rust-lang#141705 (Add eslint as part of `tidy` run)
 - rust-lang#141715 (Add `loongarch64` with `d` feature to `f32::midpoint` fast path)
 - rust-lang#141723 (Provide secrets to try builds with new bors)
 - rust-lang#141728 (Fix false documentation of FnCtxt::diverges)
 - rust-lang#141729 (resolve target-libdir directly from rustc)
 - rust-lang#141732 (creader: Remove extraenous String::clone)

r? `@ghost`
`@rustbot` modify labels: rollup
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants