fix: clippy

This commit is contained in:
Miles Murgaw committed 2023-06-30 10:48:38 -04:00
1 parent 4ab8519af6
commit 2c8c601579
13 files changed
+54 -54

No files matched your search

+3 -3
View File
@@ -320,11 +320,11 @@ impl Tool {
}
pub fn extract_zip(file: &Path, target: &Path) -> anyhow::Result<()> {
let zip_file = std::fs::File::open(&file)?;
let zip_file = std::fs::File::open(file)?;
let mut zip = zip::ZipArchive::new(zip_file)?;
if !target.exists() {
let _ = std::fs::create_dir_all(target)?;
std::fs::create_dir_all(target)?;
}
for i in 0..zip.len() {
@@ -332,7 +332,7 @@ pub fn extract_zip(file: &Path, target: &Path) -> anyhow::Result<()> {
if file.is_dir() {
// dir
let target = target.join(Path::new(&file.name().replace('\\', "")));
let _ = std::fs::create_dir_all(target)?;
std::fs::create_dir_all(target)?;
} else {
// file
let file_path = target.join(Path::new(file.name()));