Skip to content

Commit

Permalink
Fix a Clippy warning (Rust 1.85 beta)
Browse files Browse the repository at this point in the history
clippy 0.1.85 (e30eefff41 2025-01-08)
  • Loading branch information
tatsuya6502 committed Jan 11, 2025
1 parent d886697 commit 0e95836
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/frequency_sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ impl FrequencySketch {
let mut frequency = u8::MAX;
for i in 0..4 {
let index = self.index_of(hash, i);
let count = (self.table[index] >> ((start + i) << 2) & 0xF) as u8;
let shift = (start + i) << 2;
let count = ((self.table[index] >> shift) & 0xF) as u8;
frequency = frequency.min(count);
}
frequency
Expand Down

0 comments on commit 0e95836

Please sign in to comment.