From e1751a1a9d726caa66c850e06d70b91589bc10d3 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Fri, 26 Jan 2024 11:45:06 +0100 Subject: [PATCH] Fix clippy lints --- crates/jean/src/main.rs | 4 ++-- crates/rc-zip/src/format/date_time.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/jean/src/main.rs b/crates/jean/src/main.rs index 807a2f3..fe68a56 100644 --- a/crates/jean/src/main.rs +++ b/crates/jean/src/main.rs @@ -307,11 +307,11 @@ impl Truncate for &str { let len_strings = name_tokens.iter().map(|x| x.len()).sum::() + rest_tokens.iter().map(|x| x.len()).sum::(); if len_separators + len_strings < limit { - name_tokens.extend(rest_tokens.into_iter()); + name_tokens.extend(rest_tokens); break name_tokens.join("/"); } if rest_tokens.is_empty() { - name_tokens.extend(rest_tokens.into_iter()); + name_tokens.extend(rest_tokens); let name = name_tokens.join("/"); break name.chars().take(limit - 3).collect::() + "..."; } diff --git a/crates/rc-zip/src/format/date_time.rs b/crates/rc-zip/src/format/date_time.rs index e7c737e..860a002 100644 --- a/crates/rc-zip/src/format/date_time.rs +++ b/crates/rc-zip/src/format/date_time.rs @@ -56,7 +56,7 @@ impl MsdosTimestamp { // bits 0-4: second divided by 2 let s = (self.time & 0b1_1111) as u32 * 2; // bits 5-10: minute (0-59) - let m = (self.time >> 5 & 0b1111_11) as u32; + let m = (self.time >> 5 & 0b11_1111) as u32; // bits 11-15: hour (0-23 on a 24-hour clock) let h = (self.time >> 11) as u32; date.with_hour(h)?.with_minute(m)?.with_second(s)