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.
This commit is contained in:
parent
324fa0f7be
commit
43b684bbe6
|
@ -139,6 +139,7 @@ impl From<bech32::Error> for Error {
|
||||||
|
|
||||||
/// The different types of addresses.
|
/// The different types of addresses.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum AddressType {
|
pub enum AddressType {
|
||||||
/// Pay to pubkey hash.
|
/// Pay to pubkey hash.
|
||||||
P2pkh,
|
P2pkh,
|
||||||
|
|
Loading…
Reference in New Issue