hyperloglog.rs icon indicating copy to clipboard operation
hyperloglog.rs copied to clipboard

lift Clone constraint on type H

Open gwy15 opened this issue 3 months ago • 0 comments

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>.

gwy15 avatar Oct 23 '25 09:10 gwy15