rustdoc: do not allocate String when writing path full name#99775
Merged
bors merged 1 commit intorust-lang:masterfrom Jul 27, 2022
Merged
rustdoc: do not allocate String when writing path full name#99775bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.
Collaborator
|
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
Contributor
|
r? @CraftSpider (rust-highfive has picked a reviewer for you, use r? to override) |
camelid
approved these changes
Jul 26, 2022
Member
camelid
left a comment
There was a problem hiding this comment.
Even if it's not faster, it's simpler!
Member
Collaborator
Member
|
This is only used in the JSON backend, which I believe isn't tested in perf, and it's changing pretty drastically over time, so @bors rollup |
Member
|
Yeah, we don't yet have perf test for rustdoc-json, but we should (#94141) |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 27, 2022
Rollup of 8 pull requests Successful merges: - rust-lang#98583 (Stabilize Windows `FileTypeExt` with `is_symlink_dir` and `is_symlink_file`) - rust-lang#99698 (Prefer visibility map parents that are not `doc(hidden)` first) - rust-lang#99700 (Add a clickable link to the layout section) - rust-lang#99712 (passes: port more of `check_attr` module) - rust-lang#99759 (Remove dead code from cg_llvm) - rust-lang#99765 (Don't build std for *-uefi targets) - rust-lang#99771 (Update pulldown-cmark version to 0.9.2 (fixes url encoding for some chars)) - rust-lang#99775 (rustdoc: do not allocate String when writing path full name) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.