Closed nyurik closed 9 months ago
I'm not really sure what is benefit of having Clone? Do you want to copy instance instead of creating new one every time?
Normally you want to create new instance rather than cloning existing one (you need to reset state)
But I do not mind adding Clone in any way so it is fine
@DoumanAsh the Digest
trait seem to require it, I would like to offer the same Digest
trait access to all hash functions, not just the MD5/SHA256/... as part of the noncrypto-digests crate (fnv and xxh3 are implemented already). This way my sqlite-hashes crate can transparently offer all hash functions, both cryptographic and not, without knowing the specifics of any hash implementation. Moreover, I suspect others may want to have this polymorphic approach to hashes.
yeah it is fine it is anyway up to user to user Clone correctly I will merge it, but I will see to release a bit later if you need it
thx, let me know when you release (no rush), so i will add it to my crate. thx for such great response time!
I released 0.8.8
In some obscure cases, like implementing Digest traits for non-cryptographical hashes, I could really use the
Clone
implementation to keep things simpler.See https://github.com/nyurik/noncrypto-digests