Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Jan 26, 2024
1 parent 29c473a commit e1751a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/jean/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@ impl Truncate for &str {
let len_strings = name_tokens.iter().map(|x| x.len()).sum::<usize>()
+ rest_tokens.iter().map(|x| x.len()).sum::<usize>();
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::<String>() + "...";
}
Expand Down
2 changes: 1 addition & 1 deletion crates/rc-zip/src/format/date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1751a1

Please sign in to comment.