process: add Command::as_std_mut (#6608)

This commit is contained in:
Timo 2024-06-04 13:34:22 +02:00 committed by GitHub
parent 75c953bd63
commit 8fca6f6dad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -325,6 +325,12 @@ impl Command {
&self.std
}
/// Cheaply convert to a `&mut std::process::Command` for places where the type from the
/// standard library is expected.
pub fn as_std_mut(&mut self) -> &mut StdCommand {
&mut self.std
}
/// Adds an argument to pass to the program.
///
/// Only one argument can be passed per use. So instead of: