Skip to content

src-script.js: make srcIndex into a parameter instead of a global variable #138467

Open
@lolbinarycat

Description

@lolbinarycat

as far as I can tell, this is only used in createSrcSidebar, which is called in generated code like this:

var srcIndex = new Map(JSON.parse('[["test123",["",[],["test123.rs"]]]]'));
createSrcSidebar();

instead, we could have generated code like this:

let srcIndex = new Map(JSON.parse('[["test123",["",[],["test123.rs"]]]]'));
createSrcSidebar(srcIndex);

Metadata

Metadata

Assignees

Labels

A-rustdoc-uiArea: Rustdoc UI (generated HTML)A-technical-debtArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions