Add special human-readable serde for OutPoint and most bip32 types#271
Add special human-readable serde for OutPoint and most bip32 types#271apoelstra merged 5 commits intorust-bitcoin:masterfrom
Conversation
74de3c2 to
ebe6ace
Compare
|
This is great. Can you make an analogous PR to rust-elements? |
|
I think we should first get rid of the serde macros. They aren't needed since rustc 0.15. |
|
Eh, actually there's no reason to get rid of the serde macros yet. ACK mod nit. |
Were you talking about using derive for the struct macro? |
|
I addressed the |
|
Btw, any idea if it's possible to condense that macro in the two other macros? It's kind of a total code duplicate of |
|
Yeah, No, I don't have any good ideas about how to reduce code duplication :( |
|
I'm not too familiar with serde, but I can attest that:
If anyone can attest to the serde code in ebe6ace9cee3acf9f482f5921f3e4538e80d0bae that'd be great. |
1ecc696 to
b59aedf
Compare
You should be able to see that it's nothing more than the other two serde impl macros combined with an |
b59aedf to
2f51564
Compare
|
Fixed Rust v1.22 compilation. |
2f51564 to
2c2d55d
Compare
|
Added small commit to address @dongcarl 's nit. |
As was the case prior to rust-bitcoin/rust-bitcoin#271
As was the case prior to rust-bitcoin/rust-bitcoin#271
Serialized OutPoint as
"<txid>:<vout>"instead of a struct when a human-readable (de)serializer is used, f.e. JSON.It should be noted that this is a breaking change for people relying on the current JSON serialization of OutPoint as a struct.
This PR is on top of #269, but doesn't have to be.
Closes #202.