Skip to content
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

The number of arguments on Builder::bind_pattern are getting out of hand #101896

Closed
oli-obk opened this issue Sep 16, 2022 · 0 comments · Fixed by #103946
Closed

The number of arguments on Builder::bind_pattern are getting out of hand #101896

oli-obk opened this issue Sep 16, 2022 · 0 comments · Fixed by #103946
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Sep 16, 2022

We should clean up bind_pattern and other methods on the same type. I don't know yet how, we should first investigate the call sites and see if there are common patterns that can be merged:

  • two option args that are always both Some or both None
  • Maybe add an argument struct that defaults most fields
  • consider splitting it into multiple methods and then building named methods with fewer args around those split methods
@oli-obk oli-obk added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Sep 16, 2022
@bors bors closed this as completed in 7b518af Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant