Could configure_command
just be a builder function?
#1578
-
The private But other than in one of its own tests, it is always called immediately after a call to The non-test calls appear in There, the calls and their immediately preceding This was the case prior to the introduction of the But I don't think this test justifies keeping the current design of
That's what motivated me to look into this: Part of why it is probably not worthwhile is that it may require implementing Windows-compatible case-folding to be sure that it is always correct, which if done in a way whose soundness and correctness could both easily be verified would involve adding the But part of the reason is that Is there any reason to refrain from changing it to that design? Are uses that benefit from having an existing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I think if in doubt, a new function could be introduced that does not take Otherwise, I also see no problem in adjusting 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 together with you if there is anything speaking against them. |
Beta Was this translation helpful? Give feedback.
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 callsconfigure_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 theCommand
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 …