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

refactor: Minor code dedup for writing possible vals #4876

Merged
merged 1 commit into from
May 3, 2023

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented May 3, 2023

This is a minor noop code cleanup

  • writing possible values and subcommands used nearly identical code
  • writing elements used duplicate code once for items and once for last item

This actually resulted in an interesting discussion in stackoverflow and a resulting rust-itertools/itertools#697 request.

@nyurik nyurik changed the title Style: de-duplicate writing possible values Minor code deduplication for writing possible values May 3, 2023
@nyurik nyurik force-pushed the dedup-format branch 2 times, most recently from 7b2bf35 to f1dfbe4 Compare May 3, 2023 01:59
@nyurik nyurik changed the title Minor code deduplication for writing possible values chore: Minor code dedup for writing possible vals May 3, 2023
@nyurik nyurik changed the title chore: Minor code dedup for writing possible vals chore: Minor code dedup for writing possible vals May 3, 2023
@nyurik nyurik force-pushed the dedup-format branch 2 times, most recently from 0305e08 to 855b493 Compare May 3, 2023 21:06
* writing possible values and subcommands used nearly identical code
* writing elements used duplicate code once for items and once for last item
@epage epage changed the title chore: Minor code dedup for writing possible vals refactor: Minor code dedup for writing possible vals May 3, 2023
@epage
Copy link
Member

epage commented May 3, 2023

Thanks!

@epage epage merged commit a8587c9 into clap-rs:master May 3, 2023
21 checks passed
@nyurik nyurik deleted the dedup-format branch May 3, 2023 23:59
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.

None yet

2 participants