Skip to content

Commit fc3419c

Browse files
committed
tidy: deps: Hoist a complex multi-line if condition into a let
This makes the code more readable, and eliminates a clippy warning.
1 parent 40ea999 commit fc3419c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/tidy/src/deps.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,13 @@ pub fn check(path: &Path, bad: &mut bool) {
205205
let dir = t!(dir);
206206

207207
// skip our exceptions
208-
if EXCEPTIONS.iter().any(|exception| {
208+
let is_exception = EXCEPTIONS.iter().any(|exception| {
209209
dir.path()
210210
.to_str()
211211
.unwrap()
212212
.contains(&format!("src/vendor/{}", exception))
213-
}) {
213+
});
214+
if is_exception {
214215
continue;
215216
}
216217

0 commit comments

Comments
 (0)