Skip to content

Commit

Permalink
feat: Implement From<assert:cmd::Command> for process::Command
Browse files Browse the repository at this point in the history
Allows conversion with `process::Command::from(asserted_cmd)`
  • Loading branch information
mcky committed Aug 8, 2024
1 parent 4d3dbd3 commit 14a0795
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,12 @@ impl From<process::Command> for Command {
}
}

impl From<Command> for process::Command {
fn from(cmd: Command) -> process::Command {
cmd.cmd
}
}

impl<'c> OutputOkExt for &'c mut Command {
fn ok(self) -> OutputResult {
let output = self.output().map_err(OutputError::with_cause)?;
Expand Down

0 comments on commit 14a0795

Please sign in to comment.