Since Command mostly adheres to a builder pattern, and spawn can be called multiple times, it would be useful to change the program.
Motivating example: a user wants to fall back to an less common filename or path in the case of a failure to spawn.
Proposed signature would look:
pub fn program<S: AsRef<OsStr>>(&mut self, program: S) -> &mut Command
Calling program would imply calling arg0.
It doesn't look like the effected filename has a whole lot of other implications to worry about.
I could put together a PR for this if you're interested.
Since
Commandmostly adheres to a builder pattern, andspawncan be called multiple times, it would be useful to change the program.Motivating example: a user wants to fall back to an less common filename or path in the case of a failure to spawn.
Proposed signature would look:
pub fn program<S: AsRef<OsStr>>(&mut self, program: S) -> &mut CommandCalling
programwould imply callingarg0.It doesn't look like the effected
filenamehas a whole lot of other implications to worry about.I could put together a PR for this if you're interested.