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)?, };