You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #11445 - willcrichton:refactor-target-generator, r=weihanglo
Refactor generate_targets into separate module
### What does this PR try to resolve?
The `generate_targets` function is fairly complicated with an absurd number of parameters. This PR refactors the function into a `TargetGenerator` struct that represents the state of the generator, and reduces the amount of parameter-passing between the relevant functions. Additionally, the `generate_targets` function has been refactored into two smaller functions `create_proposals` and `proposals_to_units`. The docscrape-specific functionality from #11430 has been pulled out into a separate function, as promised.
### How should we test and review this PR?
This PR does not change any functionality, so no new tests are added. It should be reviewed for code style.
r? `@weihanglo`
0 commit comments