From c1f34f5c0e5d8bee825e7de50a7d8ee6645fb178 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jun 2022 15:16:18 +1000 Subject: [PATCH] Return Address directly Clippy emits: warning: returning the result of a `let` binding from a block Remove the local binding, return the `Address` directly. --- src/util/bip143.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/bip143.rs b/src/util/bip143.rs index 102076eb..80128a55 100644 --- a/src/util/bip143.rs +++ b/src/util/bip143.rs @@ -201,8 +201,7 @@ mod tests { fn p2pkh_hex(pk: &str) -> Script { let pk: PublicKey = PublicKey::from_str(pk).unwrap(); - let witness_script = Address::p2pkh(&pk, Network::Bitcoin).script_pubkey(); - witness_script + Address::p2pkh(&pk, Network::Bitcoin).script_pubkey() } fn run_test_sighash_bip143(tx: &str, script: &str, input_index: usize, value: u64, hash_type: u32, expected_result: &str) {