Skip to content

rustdoc: avoid allocating a temp String for aliases in search index #144320

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lolbinarycat
Copy link
Contributor

Here's the optimization I talked about in #143988 (comment)

I got around the Serialize issue using the newtype pattern. The wrapper type could be factored out into a helper that would work with anything that impls AsRef<&str>, but I'm not sure if that would be helpful anywhere else.

r? @GuillaumeGomez

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 22, 2025
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Looks good to me. Please fix CI then I'll r+ it, thanks!

@lolbinarycat lolbinarycat force-pushed the rustdoc-search_index-BTreeMap-str branch from 687ba3c to 9e75032 Compare July 22, 2025 19:51
@lolbinarycat
Copy link
Contributor Author

@GuillaumeGomez CI passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants