refactor: Eliminate a clone that's no longer necessary

This commit is contained in:
Chris Hennick 2024-05-15 16:57:37 -07:00
parent 7536a98da1
commit 17fee7938a
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -706,8 +706,7 @@ impl<R: Read + Seek> ZipArchive<R> {
let target = target.into_boxed_str();
let target_is_dir_from_archive =
self.shared.files.contains_key(&target) && is_dir(&target);
let target_internal_path: PathBuf = target.to_string().into();
let target_path = directory.as_ref().join(target_internal_path.clone());
let target_path = directory.as_ref().join(target.to_string().into());
let target_is_dir = if target_is_dir_from_archive {
true
} else if let Ok(meta) = std::fs::metadata(&target_path) {