From a6580363268124ffd0793a9e88c9fd72209900ce Mon Sep 17 00:00:00 2001 From: lashman Date: Fri, 6 Mar 2026 01:59:00 +0200 Subject: [PATCH] Fix clippy: collapse nested if in discovery module Phase 2 complete - 49 tests passing, zero clippy warnings. --- pixstrip-core/src/discovery.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pixstrip-core/src/discovery.rs b/pixstrip-core/src/discovery.rs index 21fc102..6a7255b 100644 --- a/pixstrip-core/src/discovery.rs +++ b/pixstrip-core/src/discovery.rs @@ -13,10 +13,10 @@ fn is_image_extension(ext: &str) -> bool { pub fn discover_images(path: &Path, recursive: bool) -> Vec { if path.is_file() { - if let Some(ext) = path.extension().and_then(|e| e.to_str()) { - if is_image_extension(ext) { - return vec![path.to_path_buf()]; - } + if let Some(ext) = path.extension().and_then(|e| e.to_str()) + && is_image_extension(ext) + { + return vec![path.to_path_buf()]; } return Vec::new(); }