rust-bitcoin / rust-bech32

Bech32 format encoding and decoding
MIT License
93 stars 49 forks source link

Add witness_version functions to `CheckedHrpstring` #175

Closed tcharding closed 7 months ago

tcharding commented 7 months ago

As we did for UncheckedHrpstring add functions to the CheckedHrpstring struct to allow checking the initial byte of the data part and removing it if required.

Add an initial patch that improves the docs on the UncheckedHrpstring::remove_witness_version function (this is then copied in patch 2).

clarkmoody commented 7 months ago

Do we need standalone tests for this, or is that captured in the docs examples?

apoelstra commented 7 months ago

Let me confirm that breaking the doc examples breaks CI on my end -- but I'm pretty sure they are run in CI, yes.

apoelstra commented 7 months ago

Ok, yes, they're run in the real CI but not in my local one :). Glad I checked this. I'll fix the local thing, then remove my failing commit.