-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
creader: Remove extraenous String::clone #141732
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Thanks! @bors r+ |
@@ -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 |
There was a problem hiding this comment.
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 👀.
btw is this allocation visible in zed profiles, or the new large-workspace benchmark, or is it just a cleanup? |
It's just a cleanup. I haven't measured it, but I don't expect it to show up in any profiles. |
@bors rollup |
Good to know. I asked because there were other allocations for the prefixes in this function that looked possibly optimizable. |
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
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
…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
A leftover from #132910