compression: indentation cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-05 12:17:04 +02:00
parent cc6e5d7372
commit 2d37cd92e0
2 changed files with 135 additions and 133 deletions

View File

@ -178,8 +178,14 @@ where
let mut hardlinks: HashMap<u64, HashMap<u64, PathBuf>> = HashMap::new(); // dev -> inode -> first path
for entry in WalkDir::new(&source).into_iter() {
match entry {
Ok(entry) => {
let entry = match entry {
Ok(entry) => entry,
Err(err) => {
eprintln!("zip: error reading directory entry: {}", err);
continue;
}
};
let entry_path = entry.path().to_owned();
let encoder = &mut encoder;
let hardlinks = &mut hardlinks;
@ -271,10 +277,5 @@ where
);
}
}
Err(err) => {
eprintln!("zip: error reading directory entry: {}", err);
}
}
}
Ok(())
}

View File

@ -632,8 +632,14 @@ where
let mut encoder = ZipEncoder::new(target);
for entry in WalkDir::new(&source).into_iter() {
match entry {
Ok(entry) => {
let entry = match entry {
Ok(entry) => entry,
Err(err) => {
eprintln!("zip: error reading directory entry: {}", err);
continue;
}
};
let entry_path = entry.path().to_owned();
let encoder = &mut encoder;
@ -672,11 +678,6 @@ where
);
}
}
Err(err) => {
eprintln!("zip: error reading directory entry: {}", err);
}
}
}
encoder.finish().await
}