Skip to content

Commit 9afed12

Browse files
committed
Merge rust-bitcoin/rust-bitcoin#1011: Add non_exhaustive compiler directive to AddressType
43b684b 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: ACK 43b684b Kixunil: ACK 43b684b apoelstra: ACK 43b684b Tree-SHA512: 2b2a15fb501d23058acca94318776ffcccedf463d43d07afa290fba46a7bd58b3a730f6e1f25605ef399afcfdb5de4c7ad67eaa0adff0ba39b0096cbcec10f57
2 parents ce2d745 + ba35470 commit 9afed12

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/util/address.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ impl From<bech32::Error> for Error {
140140

141141
/// The different types of addresses.
142142
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
143+
#[non_exhaustive]
143144
pub enum AddressType {
144145
/// Pay to pubkey hash.
145146
P2pkh,

0 commit comments

Comments
 (0)