From 58e77778145a846f76ade162f7b9df92dfd216e4 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:37:20 +0000 Subject: [PATCH] refactor(oxlint): remove extra if check in `Walkdir` (#7989) --- apps/oxlint/src/walk.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/oxlint/src/walk.rs b/apps/oxlint/src/walk.rs index b2f3160d6..10cddc7e9 100644 --- a/apps/oxlint/src/walk.rs +++ b/apps/oxlint/src/walk.rs @@ -55,9 +55,7 @@ impl ignore::ParallelVisitor for WalkCollector { fn visit(&mut self, entry: Result) -> ignore::WalkState { match entry { Ok(entry) => { - if entry.file_type().is_some_and(|ft| !ft.is_dir()) - && Walk::is_wanted_entry(&entry, &self.extensions) - { + if Walk::is_wanted_entry(&entry, &self.extensions) { self.paths.push(entry.path().to_path_buf().into_boxed_path()); } ignore::WalkState::Continue