From 748e741f740ac46ec40e42679aba3b07927709c0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 17 May 2026 15:08:03 +0900 Subject: chore: cargo clippy --fix --- .../src/class_map_generator.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/shirabe-class-map-generator/src/class_map_generator.rs') diff --git a/crates/shirabe-class-map-generator/src/class_map_generator.rs b/crates/shirabe-class-map-generator/src/class_map_generator.rs index 608dccb..733915e 100644 --- a/crates/shirabe-class-map-generator/src/class_map_generator.rs +++ b/crates/shirabe-class-map-generator/src/class_map_generator.rs @@ -200,10 +200,10 @@ impl ClassMapGenerator { // if a list of scanned files is given, avoid scanning twice the same file to save cycles and avoid generating warnings // in case a PSR-0/4 declaration follows another more specific one, or a classmap declaration, which covered this file already - if let Some(ref scanned_files) = self.scanned_files { - if scanned_files.contains(&real_path) { - continue; - } + if let Some(ref scanned_files) = self.scanned_files + && scanned_files.contains(&real_path) + { + continue; } // check the realpath of the file against the excluded paths as the path might be a symlink and the excluded path is realpath'd so symlink are resolved @@ -228,10 +228,10 @@ impl ClassMapGenerator { )?; // if no valid class was found in the file then we do not mark it as scanned as it might still be matched by another rule later - if !filtered.is_empty() { - if let Some(ref mut scanned_files) = self.scanned_files { - scanned_files.add(real_path); - } + if !filtered.is_empty() + && let Some(ref mut scanned_files) = self.scanned_files + { + scanned_files.add(real_path); } filtered -- cgit v1.3.1