From d7cac976dc3ce23fcd119e8194b1cb824e1800df Mon Sep 17 00:00:00 2001 From: DebugSteven Date: Sun, 1 Jan 2023 14:34:40 -0700 Subject: [PATCH] combine error branches --- src/tools/tidy/src/x_version.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tools/tidy/src/x_version.rs b/src/tools/tidy/src/x_version.rs index 9cb762b9419..0a5055f6191 100644 --- a/src/tools/tidy/src/x_version.rs +++ b/src/tools/tidy/src/x_version.rs @@ -14,9 +14,7 @@ pub fn check(bad: &mut bool) { let (child, temp_child) = match (result, temp_result) { (Ok(child), Ok(temp_child)) => (child, temp_child), - // what would it mean if the temp cmd error'd? - (Ok(_child), Err(_e)) => todo!(), - (Err(e), _) => match e.kind() { + (Err(e), _) | (_, Err(e)) => match e.kind() { ErrorKind::NotFound => return, _ => return tidy_error!(bad, "failed to run `x`: {}", e), },