From c23bcc55fbdb004e2b00860d00d0b932f957cbed Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Thu, 9 May 2024 17:15:07 -0700 Subject: [PATCH] chore: Add a borrow to fix a build error Why didn't the compiler raise this last time?! --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index 094621d4..8f85b4e4 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1756,7 +1756,7 @@ fn write_local_file_header(writer: &mut T, file: &ZipFileData) -> ZipR writer.write_u16_le(file.file_name_raw.len() as u16)?; // extra field length let mut extra_field_length = if file.large_file { 20 } else { 0 }; - if let Some(field) = file.extra_field { + if let Some(field) = &file.extra_field { extra_field_length += field.len(); } match extra_field_length.try_into() {