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(); }