tidy: deps: Hoist a complex multi-line if condition into a let

This makes the code more readable, and eliminates a clippy warning.
This commit is contained in:
Josh Triplett 2018-09-01 17:36:37 -07:00
parent 40ea999915
commit fc3419c762

View File

@ -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;
}