From 8d454d22778ee73db77277e0c5cde02a074b5744 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Sat, 18 May 2024 08:18:54 -0400 Subject: [PATCH] nitpick --- src/types.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/types.rs b/src/types.rs index 9679968c..4ca0da8a 100644 --- a/src/types.rs +++ b/src/types.rs @@ -700,11 +700,14 @@ impl ZipFileData { } fn flags(&self) -> u16 { - (if self.is_utf8() && !self.is_ascii() { + let utf8_bit: u16 = if self.is_utf8() && !self.is_ascii() { 1u16 << 11 } else { 0 - }) | if self.encrypted { 1u16 << 0 } else { 0 } + }; + let encrypted_bit: u16 = if self.encrypted { 1u16 << 0 } else { 0 }; + + utf8_bit | encrypted_bit } fn clamp_size_field(&self, field: u64) -> u32 {