Skip to content

Commit

Permalink
Merge pull request #29 from moka-rs/fix-ci-2024-06-09
Browse files Browse the repository at this point in the history
Fix Clippy warinings (2024-06-09)
  • Loading branch information
tatsuya6502 authored Jun 9, 2024
2 parents 6d480a1 + 10185c3 commit f449f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/frequency_sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl FrequencySketch {
}

let start = ((hash & 3) << 2) as u8;
let mut frequency = std::u8::MAX;
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;
Expand Down Expand Up @@ -252,7 +252,7 @@ mod tests {
let mut sketch = FrequencySketch::default();
sketch.ensure_capacity(512);
let mut indexes = std::collections::HashSet::new();
let hashes = [std::u64::MAX, 0, 1];
let hashes = [u64::MAX, 0, 1];
for hash in hashes.iter() {
for depth in 0..4 {
indexes.insert(sketch.index_of(*hash, depth));
Expand Down

0 comments on commit f449f53

Please sign in to comment.