Skip to content

Commit

Permalink
Use is_err instead of redundant pattern matching
Browse files Browse the repository at this point in the history
Clippy emits:

  warning: redundant pattern matching, consider using `is_err()`

As suggested, use `is_err()`.
  • Loading branch information
tcharding committed May 16, 2024
1 parent ef868cc commit b9a207b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitcoind-tests/tests/test_desc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ pub fn test_desc_satisfy(
println!("Testing descriptor: {}", definite_desc);
// Finalize the transaction using psbt
// Let miniscript do it's magic!
if let Err(_) = psbt.finalize_mut(&secp) {
if psbt.finalize_mut(&secp).is_err() {
return Err(DescError::PsbtFinalizeError);
}
let tx = psbt.extract(&secp).expect("Extraction error");
Expand Down

0 comments on commit b9a207b

Please sign in to comment.