We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 816e4ec commit ca62a97Copy full SHA for ca62a97
library/std/src/sys/windows/process.rs
@@ -208,6 +208,14 @@ impl Command {
208
pub fn arg(&mut self, arg: &OsStr) {
209
self.args.push(Arg::Regular(arg.to_os_string()))
210
}
211
+ pub fn args_clear(&mut self) {
212
+ self.args.truncate(1);
213
+ }
214
+ pub fn arg_set(&mut self, index: usize, arg: &OsStr) {
215
+ assert!(index >= 1, "Index must be >= 1");
216
+ debug_assert!(index < self.args.len(), "Index out of range");
217
+ self.args[index] = Arg::Regular(arg.to_os_string());
218
219
pub fn env_mut(&mut self) -> &mut CommandEnv {
220
&mut self.env
221
0 commit comments