hyperloglog.rs
hyperloglog.rs copied to clipboard
lift Clone constraint on type H
Hello,
I noticed that HLL and HLL+ implements Clone using derive. Default compiler implementation requires that H implements Clone for HyperLogLogPF<H, B> and HyperLogLogPlus<H, B>. This is unnecessary since only hashes are used and type H is merely used as type check.
This PR lifts the Clone constraint on type H by implement Clone mannually rather than using derive.
It is useful when working with types like HyperLogLogPF<str>.