use std::io::Result as IoResult; use std::process::Command; use std::process::Output; pub trait CommandRunner { fn run_with_args(&self, program: &str, args: &[&str]) -> IoResult; } #[derive(Debug)] pub struct StdCommandRunner; impl CommandRunner for StdCommandRunner { fn run_with_args(&self, program: &str, args: &[&str]) -> IoResult { Command::new(program).args(args).output() } } #[cfg(test)] mod test { }