Skip to content

Commit

Permalink
Added default value
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCappelletti94 committed Aug 21, 2024
1 parent 1f41b6e commit 8c875c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hyperloglog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ const DEFAULT_P: usize = 14_usize;
/// Register num is 1 << P
#[derive(Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "mem_dbg", derive(mem_dbg::MemSize, mem_dbg::MemDbg))]
pub struct HyperLogLog<H, const P: usize = DEFAULT_P> {
pub struct HyperLogLog<H=AHasher, const P: usize = DEFAULT_P> {
pub(crate) registers: Vec<u8>,
_hasher: std::marker::PhantomData<H>,
}

impl<const P: usize> Default for HyperLogLog<AHasher, P> {
impl<H: Default + Hasher, const P: usize> Default for HyperLogLog<H, P> {
fn default() -> Self {
Self::new()
}
Expand Down

0 comments on commit 8c875c8

Please sign in to comment.