From 10185c373cd7ffb30fd7f0f6cb2c9cda7ad2a043 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sun, 9 Jun 2024 18:57:43 +0800 Subject: [PATCH] Fix Clippy warnings clippy 0.1.79 (d9e85b56e7f 2024-05-25) (beta) --- src/common/frequency_sketch.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/frequency_sketch.rs b/src/common/frequency_sketch.rs index de4a072..1055ddb 100644 --- a/src/common/frequency_sketch.rs +++ b/src/common/frequency_sketch.rs @@ -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; @@ -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));