Skip to content

Commit

Permalink
zcash_address: Fix clippy lint by using matches! macro
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jul 12, 2021
1 parent 8527dcb commit b875f6c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions components/zcash_address/src/kind/unified.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,9 @@ impl From<Typecode> for u8 {

impl Typecode {
fn is_transparent(&self) -> bool {
match self {
Typecode::P2pkh | Typecode::P2sh => true,
// Unknown typecodes are treated as not transparent for the purpose of
// disallowing only-transparent UAs, which can be represented with existing
// address encodings.
_ => false,
}
// Unknown typecodes are treated as not transparent for the purpose of disallowing
// only-transparent UAs, which can be represented with existing address encodings.
matches!(self, Typecode::P2pkh | Typecode::P2sh)
}
}

Expand Down

0 comments on commit b875f6c

Please sign in to comment.