use into_result::IntoResult as _; use std::process::Command; fn main() { let _ = dbg!(Command::new("ls").status().into_result()); let _ = dbg!(Command::new("cp").status().into_result()); let _ = dbg!(Command::new("a-command-that-definitely-won't-exist") .status() .into_result()); }