mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 18:13:39 +00:00
chore: resolve SonarCloud maintainability issues (#9044)
* chore: resolve SonarCloud maintainability issues * fix: format imports and fix effect_entry argument type * fix: restore test closure and wildcard import that broke compilation * refactor: split composite_to_surface to reduce cognitive complexity
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@
|
||||
//! `--update-manifest` rewrites the manifest from the download (after moving a pin).
|
||||
//! Local mode copies from a working clone instead of downloading (see `fetch_local`).
|
||||
|
||||
use std::ffi::OsStr;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
|
||||
@@ -117,7 +118,7 @@ impl PinnedCorpus {
|
||||
}
|
||||
if ft.is_dir() {
|
||||
self.collect_inner(&p, base, out, visited, dirs);
|
||||
} else if ft.is_file() && p.extension().and_then(|e| e.to_str()).is_some_and(|e| self.exts.iter().any(|x| e.eq_ignore_ascii_case(x))) {
|
||||
} else if ft.is_file() && p.extension().and_then(OsStr::to_str).is_some_and(|e| self.exts.iter().any(|x| e.eq_ignore_ascii_case(x))) {
|
||||
out.push(p.strip_prefix(base).unwrap_or(&p).to_path_buf());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user