From b9a207bfd58b8f961c44976e6ff72b8940bf9f21 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 3 May 2024 13:58:03 +1000 Subject: [PATCH] Use is_err instead of redundant pattern matching Clippy emits: warning: redundant pattern matching, consider using `is_err()` As suggested, use `is_err()`. --- bitcoind-tests/tests/test_desc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoind-tests/tests/test_desc.rs b/bitcoind-tests/tests/test_desc.rs index 90dd7c0d2..24abb1e6a 100644 --- a/bitcoind-tests/tests/test_desc.rs +++ b/bitcoind-tests/tests/test_desc.rs @@ -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");