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

Reduce code duplication in suggestion methods #2392

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

neunenak
Copy link
Contributor

The existing suggest_recipe and suggest_variable methods have a decent chunk of duplicate code. This commit factors that out into a separate method.

@casey casey enabled auto-merge (squash) September 27, 2024 22:07
@casey
Copy link
Owner

casey commented Sep 27, 2024

I changed it to use the min_by_key method on iterators to avoid collecting into a vec. I'm also kind of a comment hater, unless it's on "thar be dragons" type code, so I removed it.

@casey casey merged commit 70476be into casey:master Sep 27, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants