`PublicKey` and `XOnlyPublicKey` should not *derive* `Debug`
Kixunil opened this issue · 2 comments
Kixunil commented
It should be manually implemented to show the key as serialized. Otherwise it shows just the internal data which, for the purpose of debugging, is just a garbage. See also: rust-bitcoin/rust-bitcoin#3278
apoelstra commented
For the purpose of debugging, is it garbage? I guess it depends on what level you are debugging at. If you are debugging this library then presumably you want the raw representation.
Weak concept ACK, but I can see either side on this one.
Kixunil commented
If you really need to debug the internal representation you should use the FFI type which appropriately shows the internal representation. (But calling it out in the doc would be nice.)