Use if let instead of destructuring pattern
Clippy emits: warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` As suggested, use `if let`.
This commit is contained in:
parent
a9365375c1
commit
229fcb9f1f
|
@ -178,9 +178,8 @@ impl FromStr for PsbtSighashType {
|
||||||
// NB: some of Schnorr sighash types are non-standard for pre-taproot
|
// NB: some of Schnorr sighash types are non-standard for pre-taproot
|
||||||
// inputs. We also do not support SIGHASH_RESERVED in verbatim form
|
// inputs. We also do not support SIGHASH_RESERVED in verbatim form
|
||||||
// ("0xFF" string should be used instead).
|
// ("0xFF" string should be used instead).
|
||||||
match SchnorrSighashType::from_str(s) {
|
if let Ok(ty) = SchnorrSighashType::from_str(s) {
|
||||||
Ok(ty) => return Ok(ty.into()),
|
return Ok(ty.into());
|
||||||
Err(_) => {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We accept non-standard sighash values.
|
// We accept non-standard sighash values.
|
||||||
|
|
Loading…
Reference in New Issue