Skip to content

Commit

Permalink
refactor(oxlint): remove extra if check in Walkdir (#7989)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Dec 18, 2024
1 parent 1cf7b83 commit 58e7777
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/oxlint/src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ impl ignore::ParallelVisitor for WalkCollector {
fn visit(&mut self, entry: Result<ignore::DirEntry, ignore::Error>) -> 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
Expand Down

0 comments on commit 58e7777

Please sign in to comment.