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:
parent
ff8d585c17
commit
c1f34f5c0e
|
@ -201,8 +201,7 @@ mod tests {
|
||||||
|
|
||||||
fn p2pkh_hex(pk: &str) -> Script {
|
fn p2pkh_hex(pk: &str) -> Script {
|
||||||
let pk: PublicKey = PublicKey::from_str(pk).unwrap();
|
let pk: PublicKey = PublicKey::from_str(pk).unwrap();
|
||||||
let witness_script = Address::p2pkh(&pk, Network::Bitcoin).script_pubkey();
|
Address::p2pkh(&pk, Network::Bitcoin).script_pubkey()
|
||||||
witness_script
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_test_sighash_bip143(tx: &str, script: &str, input_index: usize, value: u64, hash_type: u32, expected_result: &str) {
|
fn run_test_sighash_bip143(tx: &str, script: &str, input_index: usize, value: u64, hash_type: u32, expected_result: &str) {
|
||||||
|
|
Loading…
Reference in New Issue