Return Address directly

Clippy emits:

  warning: returning the result of a `let` binding from a block

Remove the local binding, return the `Address` directly.
This commit is contained in:
Tobin C. Harding 2022-06-07 15:16:18 +10:00
parent ff8d585c17
commit c1f34f5c0e
1 changed files with 1 additions and 2 deletions

View File

@ -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) {