Closed olson-sean-k closed 5 years ago
I don't particularly see the reason for into_key_data
. I think KeyData::from(key)
or just key.into()
when type inference allows it is sufficient. Please update your pull request to remove that and I'll accept it.
Please update your pull request to remove that and I'll accept it.
Sounds good to me. I've removed into_key_data
. Let me know if you'd like me to squash the commits.
KeyData
and containing types likeDefaultKey
derive aDebug
implementation. This allows keys to be printed, but includes superfluous text. For example, aDefaultKey
may be printed asDefaultKey(KeyData { idx: 0, version: 1 })
.This change provides a custom
Debug
implementation forKeyData
that prints0v1
instead. For containing key types likeDefaultKey
, the output looks likeDefaultKey(0v1)
.This change also introduces an
into_key_data
function on generated key types. This allows user code to more easily extractKeyData
for debugging purposes. For example, this could be used forDebug
implementations for downstream key abstractions.