Closed fjarri closed 1 month ago
You mean why those methods don't have blanket impls? It's because those implementations reside in the blanket impl of the trait itself. It uses the underlying traits directly without adding a layer of indirection (i.e. we use Update::update
directly instead of using Digest::update
which in turn uses Update::update
). We could've used blanket methods implementations, but it's a very minor implementation detail considering that Digest
should not be directly implemented by user crates.
Ah, I see, that makes sense. I don't think it would hurt adding the blanket impls still, but I don't insist on it. Closing.
It seems that a number of currently required methods in
Digest
can be expressed via other methods, for example:chain_update
viaupdate
finalize
viafinalize_into
finalize_reset
viareset
andfinalize
finalize_into_reset
viareset
andfinalize_into
new
vianew_with_prefix
with an empty sliceIs there a reason it's not currently done?