aboutsummaryrefslogtreecommitdiffstats
path: root/src/run/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/run/mod.rs')
-rw-r--r--src/run/mod.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs
index a5fd69a..5b2d32d 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -109,18 +109,10 @@ pub enum SpawnedCmd {
Pipeline(SpawnedPipeline),
}
-trait IsSuccessful {
- fn is_successful(&self) -> bool;
+trait ExecResultAsBool {
fn as_bool(&self) -> Result<bool, ExecError>;
}
-impl IsSuccessful for Result<(), ExecError> {
- fn is_successful(&self) -> bool {
- match self {
- Ok(_) | Err(ExecError::ExecError(0)) => true,
- _ => false,
- }
- }
-
+impl ExecResultAsBool for Result<(), ExecError> {
/// returns the boolean value interpreted from this exit code.
///
/// in case the exit code indicates divergence (break/continue) that "error" will be propagated