From efec43b3b8827820cf35fe1b73d8e33f5fe84eb4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 01:16:50 +0900 Subject: refactor: auto-fix clippy warnings --- crates/shirabe/src/util/zip.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/shirabe/src/util/zip.rs') diff --git a/crates/shirabe/src/util/zip.rs b/crates/shirabe/src/util/zip.rs index d76d805..4231db4 100644 --- a/crates/shirabe/src/util/zip.rs +++ b/crates/shirabe/src/util/zip.rs @@ -45,10 +45,10 @@ impl Zip { fn locate_file(zip: &ZipArchive, filename: &str) -> Result { // return root composer.json if it is there and is a file - if let Some(index) = zip.locate_name(filename) { - if zip.get_from_index(index).is_some() { - return Ok(index); - } + if let Some(index) = zip.locate_name(filename) + && zip.get_from_index(index).is_some() + { + return Ok(index); } let mut top_level_paths: IndexMap = IndexMap::new(); @@ -95,10 +95,10 @@ impl Zip { if !top_level_paths.is_empty() { let first_key = top_level_paths.keys().next().unwrap().clone(); - if let Some(index) = zip.locate_name(&format!("{}{}", first_key, filename)) { - if zip.get_from_index(index).is_some() { - return Ok(index); - } + if let Some(index) = zip.locate_name(&format!("{}{}", first_key, filename)) + && zip.get_from_index(index).is_some() + { + return Ok(index); } } -- cgit v1.3.1