-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Refactor out common code into a IndexItem::new constructor
#149452
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
base: main
Are you sure you want to change the base?
Conversation
|
@lolbinarycat Felt like doing something semi-mechanical that doesn't require too much concentration, so thought I'd tackle the issue you opened. But TBH, after pulling out the common code into an |
This comment has been minimized.
This comment has been minimized.
5e3263a to
32d0484
Compare
32d0484 to
6cedf2c
Compare
| let desc = short_markdown_summary(&item.doc_value(), &item.link_names(cache)); | ||
| let search_type = get_function_type_for_search(item, tcx, impl_generics, parent_did, cache); | ||
| let aliases = item.attrs.get_doc_aliases(); | ||
| let deprecation = item.deprecation(tcx); |
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.
I wonder if it makes sense to extract this subset of fields into a separate struct and include is a field on IndexItem?
Then maybe its constructor won't have to handle so many differences in behavior between the two call sites
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
It was working on #149460 that inspired this issue, and I agree that perhaps a substruct would be a better approach. |
#149404