Clippy
This commit is contained in:
parent
67aa009746
commit
f7431ca6a4
1 changed files with 13 additions and 15 deletions
|
@ -126,8 +126,7 @@ fn handle_gzip(blob: Arc<Blob>, container: Vec<u8>) -> DecryptedData {
|
||||||
let gzip_dec = flate2::read::GzDecoder::new(cursor);
|
let gzip_dec = flate2::read::GzDecoder::new(cursor);
|
||||||
let mut archive = tar::Archive::new(gzip_dec);
|
let mut archive = tar::Archive::new(gzip_dec);
|
||||||
if let Ok(files) = archive.entries() {
|
if let Ok(files) = archive.entries() {
|
||||||
for file in files {
|
for file in files.flatten() {
|
||||||
if let Ok(file) = file {
|
|
||||||
let file_path = if let Ok(file_path) = file.path() {
|
let file_path = if let Ok(file_path) = file.path() {
|
||||||
file_path.display().to_string()
|
file_path.display().to_string()
|
||||||
} else {
|
} else {
|
||||||
|
@ -139,11 +138,10 @@ fn handle_gzip(blob: Arc<Blob>, container: Vec<u8>) -> DecryptedData {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if entries.is_empty() {
|
||||||
if entries.len() > 0 {
|
|
||||||
DecryptedData::Archive(blob, entries)
|
|
||||||
} else {
|
|
||||||
DecryptedData::Blob(blob)
|
DecryptedData::Blob(blob)
|
||||||
|
} else {
|
||||||
|
DecryptedData::Archive(blob, entries)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue