chore: Add a borrow to fix a build error

Why didn't the compiler raise this last time?!
This commit is contained in:
Chris Hennick 2024-05-09 17:15:07 -07:00 committed by GitHub
parent e9e5e01e3d
commit c23bcc55fb
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -1756,7 +1756,7 @@ fn write_local_file_header<T: Write>(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() {