-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: do not allocate String when writing path full name #99775
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
Conversation
No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
r? @CraftSpider (rust-highfive has picked a reviewer for you, use r? to override) |
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.
Even if it's not faster, it's simpler!
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 |
Yeah, we don't yet have perf test for rustdoc-json, but we should (#94141) |
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
No idea if this makes any perf difference, but it just seems like premature pessimisation to use String when str will do.