Fix clippy: collapse nested if in discovery module

Phase 2 complete - 49 tests passing, zero clippy warnings.
This commit is contained in:
2026-03-06 01:59:00 +02:00
parent fea51ed220
commit a658036326

View File

@@ -13,11 +13,11 @@ fn is_image_extension(ext: &str) -> bool {
pub fn discover_images(path: &Path, recursive: bool) -> Vec<PathBuf> { pub fn discover_images(path: &Path, recursive: bool) -> Vec<PathBuf> {
if path.is_file() { if path.is_file() {
if let Some(ext) = path.extension().and_then(|e| e.to_str()) { if let Some(ext) = path.extension().and_then(|e| e.to_str())
if is_image_extension(ext) { && is_image_extension(ext)
{
return vec![path.to_path_buf()]; return vec![path.to_path_buf()];
} }
}
return Vec::new(); return Vec::new();
} }