From 309d165606d06bfee5dd554876f95ad6971d378b Mon Sep 17 00:00:00 2001 From: ttyS3 Date: Fri, 6 Sep 2024 13:51:01 +0000 Subject: [PATCH] fix(archive): replace unwrap with error handling in zip.rs --- src/archive/zip.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/archive/zip.rs b/src/archive/zip.rs index 5b99a02..234755c 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -45,8 +45,7 @@ where for idx in 0..archive.len() { let mut file = match password { Some(password) => archive - .by_index_decrypt(idx, password.to_owned().as_bytes()) - .unwrap() + .by_index_decrypt(idx, password.to_owned().as_bytes())? .map_err(|_| zip::result::ZipError::UnsupportedArchive("Password required to decrypt file"))?, None => archive.by_index(idx)?, };