Skip to content

Commit 610ab8d

Browse files
committed
Return Address directly
Clippy emits: warning: returning the result of a `let` binding from a block Remove the local binding, return the `Address` directly.
1 parent c28de29 commit 610ab8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/bip143.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ mod tests {
201201

202202
fn p2pkh_hex(pk: &str) -> Script {
203203
let pk: PublicKey = PublicKey::from_str(pk).unwrap();
204-
let witness_script = Address::p2pkh(&pk, Network::Bitcoin).script_pubkey();
205-
witness_script
204+
Address::p2pkh(&pk, Network::Bitcoin).script_pubkey()
206205
}
207206

208207
fn run_test_sighash_bip143(tx: &str, script: &str, input_index: usize, value: u64, hash_type: u32, expected_result: &str) {

0 commit comments

Comments
 (0)