Merge rust-bitcoin/rust-bitcoin#1011: Add non_exhaustive compiler directive to `AddressType`
43b684bbe6
Add non_exhaustive compiler directive to AddressType (Tobin C. Harding) Pull request description: Add non_exhaustive compiler directive to AddressType Currently adding variants to enums is a breaking change. In an effort to reduce the upgrade burden on users we can use the `non_exhaustive` compiler directive so that adding a new variant does not cause downstream code to break. Add `non_exhaustive` to the `AddressType` since it may be extended in the future. ACKs for top commit: sanket1729: ACK43b684bbe6
Kixunil: ACK43b684bbe6
apoelstra: ACK43b684bbe6
Tree-SHA512: 2b2a15fb501d23058acca94318776ffcccedf463d43d07afa290fba46a7bd58b3a730f6e1f25605ef399afcfdb5de4c7ad67eaa0adff0ba39b0096cbcec10f57
This commit is contained in:
commit
adf3958127
|
@ -140,6 +140,7 @@ impl From<bech32::Error> for Error {
|
|||
|
||||
/// The different types of addresses.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[non_exhaustive]
|
||||
pub enum AddressType {
|
||||
/// Pay to pubkey hash.
|
||||
P2pkh,
|
||||
|
|
Loading…
Reference in New Issue