Fix clippy in zip_extraction.rs

Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
Jiahao XU 2024-10-30 11:12:17 +11:00 committed by GitHub
parent 360cb23d00
commit 4a795af426
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ pub(super) fn do_extract_zip(f: File, dir: &Path) -> Result<ExtractedFiles, Down
match entry.kind() { match entry.kind() {
EntryKind::Symlink => { EntryKind::Symlink => {
extracted_files.add_file(&name); extracted_files.add_file(name);
cfg_if! { cfg_if! {
if #[cfg(windows)] { if #[cfg(windows)] {
do_extract_file()?; do_extract_file()?;
@ -56,7 +56,7 @@ pub(super) fn do_extract_zip(f: File, dir: &Path) -> Result<ExtractedFiles, Down
} }
EntryKind::Directory => (), EntryKind::Directory => (),
EntryKind::File => { EntryKind::File => {
extracted_files.add_file(&name); extracted_files.add_file(name);
do_extract_file()?; do_extract_file()?;
} }
} }