From 3e06f6433afdc485fbbf4e46f79070ade5996e63 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Wed, 15 May 2024 17:08:40 -0700 Subject: [PATCH] chore: Fix borrow-of-moved-value --- src/read.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/read.rs b/src/read.rs index 25afc73f..e49ef6bf 100644 --- a/src/read.rs +++ b/src/read.rs @@ -727,11 +727,11 @@ impl ZipArchive { std::os::windows::fs::symlink_file(target_path, outpath.as_path())?; } } - } else { - let mut file = self.by_index(i)?; - let mut outfile = fs::File::create(&outpath)?; - io::copy(&mut file, &mut outfile)?; + continue; } + let mut file = self.by_index(i)?; + let mut outfile = fs::File::create(&outpath)?; + io::copy(&mut file, &mut outfile)?; #[cfg(unix)] { // Check for real permissions, which we'll set in a second pass