Skip to content

Commit

Permalink
Added missing mem_dbg derive
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCappelletti94 committed Aug 15, 2024
1 parent 3064581 commit 46a069c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/h2b/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ impl Sketch for M64 {
#[inline]
#[allow(clippy::cast_possible_truncation)]
fn val(&self, stream: u32) -> u8 {
debug_assert!(stream
Self::STREAMS);
debug_assert!(stream < Self::STREAMS);
let high_bit = (self.high >> stream) as u8 & 1;
let low_bit = (self.low >> stream) as u8 & 1;
high_bit << 1 | low_bit
Expand Down Expand Up @@ -163,6 +162,7 @@ impl Sketch for M128 {
/// to optimize for cache locallity when compiting inside
/// a vectored sketch
#[derive(Default, Clone, Copy, Debug, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "mem_dbg", derive(mem_dbg::MemDbg, mem_dbg::MemSize))]
struct HiLoRegister {
high: u128,
low: u128,
Expand Down

0 comments on commit 46a069c

Please sign in to comment.