From 1050fe9cae88643ebe18436bc99a02f2c1c9961a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 4 Nov 2022 11:49:14 +1100 Subject: [PATCH] Remove unnecessary borrow Clippy emits: warning: the borrowed expression implements the required traits As suggested, remove the unnecessary explicit borrow. --- bitcoin/src/sign_message.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitcoin/src/sign_message.rs b/bitcoin/src/sign_message.rs index f85795a1..6094e9a1 100644 --- a/bitcoin/src/sign_message.rs +++ b/bitcoin/src/sign_message.rs @@ -281,9 +281,8 @@ mod tests { let signature = super::MessageSignature::from_base64(signature_base64).expect("message signature"); - let pubkey = - PublicKey::from_slice(&::base64::decode(&pubkey_base64).expect("base64 string")) - .expect("pubkey slice"); + let pubkey = PublicKey::from_slice(&base64::decode(pubkey_base64).expect("base64 string")) + .expect("pubkey slice"); let p2pkh = Address::p2pkh(&pubkey, Network::Bitcoin); assert_eq!(signature.is_signed_by_address(&secp, &p2pkh, msg_hash), Ok(false));