From fc3419c762dd23788f1daa723dd6172619212612 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 1 Sep 2018 17:36:37 -0700 Subject: [PATCH] tidy: deps: Hoist a complex multi-line if condition into a let This makes the code more readable, and eliminates a clippy warning. --- src/tools/tidy/src/deps.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index ee1fc0ca510..7278bbf3595 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -205,12 +205,13 @@ pub fn check(path: &Path, bad: &mut bool) { let dir = t!(dir); // skip our exceptions - if EXCEPTIONS.iter().any(|exception| { + let is_exception = EXCEPTIONS.iter().any(|exception| { dir.path() .to_str() .unwrap() .contains(&format!("src/vendor/{}", exception)) - }) { + }); + if is_exception { continue; }