diff --git a/src/command.rs b/src/command.rs index 7fc58ba..f2767b1 100644 --- a/src/command.rs +++ b/src/command.rs @@ -7,27 +7,27 @@ use std::iter::once; use std::process::{Command, ExitStatus, Output}; pub trait LogRunnable { - fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError>; - fn collect_output(&mut self) -> Result>; - fn collect_full_output(&mut self) -> Result>; + fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>>; + fn collect_output(&mut self) -> Result>; + fn collect_full_output(&mut self) -> Result>; } impl LogRunnable for Command { - fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError> { + fn run(&mut self, logger: &Logger) -> Result<(), CommandSpecificError<'_, ExecutionError>> { run(self, logger).map_err(|error| CommandSpecificError { command: self, error, }) } - fn collect_output(&mut self) -> Result> { + fn collect_output(&mut self) -> Result> { collect_output(self, None).map_err(|error| CommandSpecificError { command: self, error, }) } - fn collect_full_output(&mut self) -> Result> { + fn collect_full_output(&mut self) -> Result> { collect_full_output(self).map_err(|error| CommandSpecificError { command: self, error,