Skip to content

Could configure_command just be a builder function? #1578

Closed Answered by Byron
EliahKagan asked this question in Q&A
Discussion options

You must be logged in to vote

I think if in doubt, a new function could be introduced that does not take &mut Command as first argument, but the item to execute, and then calls configure_command() internally, keeping it available for those few cases that currently (actually) need it.

Otherwise, I also see no problem in adjusting configure_command() to create the Command instance itself, and adjust the few cases that used it with &mut Command to not do that anymore.

Option 1 seems like it's faster to implement.

Also, for future reference, please do feel free to freely refactor such things, or make any change you see a need for, there isn't any need to ask. In PRs that make such alteration, I would be finding solutions …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@EliahKagan
Comment options

@EliahKagan
Comment options

@Byron
Comment options

@EliahKagan
Comment options

@EliahKagan
Comment options

Answer selected by EliahKagan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants