fix: clippy

This commit is contained in:
Marli Frost 2023-02-01 18:03:03 +00:00
parent d06d4b295f
commit c4c6ec9e7c
3 changed files with 5 additions and 6 deletions

View file

@ -1004,10 +1004,9 @@ impl<'a> Drop for ZipFile<'a> {
match reader.read(&mut buffer) {
Ok(0) => break,
Ok(_) => (),
Err(e) => panic!(
"Could not consume all of the output of the current ZipFile: {:?}",
e
),
Err(e) => {
panic!("Could not consume all of the output of the current ZipFile: {e:?}")
}
}
}
}

View file

@ -95,7 +95,7 @@ impl<R: Read> ZipStreamReader<R> {
use std::os::unix::fs::PermissionsExt;
if let Some(mode) = metadata.unix_mode() {
fs::set_permissions(&outpath, fs::Permissions::from_mode(mode))?;
fs::set_permissions(outpath, fs::Permissions::from_mode(mode))?;
}
}

View file

@ -26,6 +26,6 @@ fn invalid_header() {
let archive = zip::ZipArchive::new(reader);
match archive {
Err(ZipError::InvalidArchive(_)) => {}
value => panic!("Unexpected value: {:?}", value),
value => panic!("Unexpected value: {value:?}"),
}
}