Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,16 @@ impl Command {
let child = Child::new(self);
async { child?.output().await }
}

/// Cheaply convert to a `&std::process::Command` for places where the type from the standard library is expected.
pub fn as_std(&self) -> &std::process::Command {
&self.inner
}

/// Cheaply convert to a `&mut std::process::Command` for places where the type from the standard library is expected.
pub fn as_mut_std(&mut self) -> &mut std::process::Command {
&mut self.inner
}
}

impl From<std::process::Command> for Command {
Expand Down