aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-class-map-generator/src/class_map_generator.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 15:08:03 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 15:08:03 +0900
commit748e741f740ac46ec40e42679aba3b07927709c0 (patch)
tree31f01831b11613631ba68da047abf1a9aa43f1b0 /crates/shirabe-class-map-generator/src/class_map_generator.rs
parent79bcd3a9ce71954ce7b257e5f3ca1c147c0d974a (diff)
downloadphp-shirabe-748e741f740ac46ec40e42679aba3b07927709c0.tar.gz
php-shirabe-748e741f740ac46ec40e42679aba3b07927709c0.tar.zst
php-shirabe-748e741f740ac46ec40e42679aba3b07927709c0.zip
chore: cargo clippy --fix
Diffstat (limited to 'crates/shirabe-class-map-generator/src/class_map_generator.rs')
-rw-r--r--crates/shirabe-class-map-generator/src/class_map_generator.rs16
1 files changed, 8 insertions, 8 deletions
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