Skip to content

[rustdoc] IndexItem initialization logic is duplicated #149404

@lolbinarycat

Description

@lolbinarycat

both add_item_to_search_index in formats/cache.rs and build_index in html/render/search_index.rs construct this type. Both functions have a decent bit of logic that is unique to them, but they also have a fair bit of logic that is the same for both.

I think moving this shared logic into an associated function on IndexItem would make the code easier to maintain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions