Remove unnecessary call to clone
Clippy emits: warning: using `clone` on type `secp256k1::XOnlyPublicKey` which implements the `Copy` trait As suggested, remove call to `clone`.
This commit is contained in:
parent
27649ba182
commit
f81d4aa9bd
|
@ -109,7 +109,7 @@ impl TapTweak for UntweakedPublicKey {
|
||||||
/// The tweaked key and its parity.
|
/// The tweaked key and its parity.
|
||||||
fn tap_tweak<C: Verification>(self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash>) -> (TweakedPublicKey, secp256k1::Parity) {
|
fn tap_tweak<C: Verification>(self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash>) -> (TweakedPublicKey, secp256k1::Parity) {
|
||||||
let tweak_value = TapTweakHash::from_key_and_tweak(self, merkle_root).into_inner();
|
let tweak_value = TapTweakHash::from_key_and_tweak(self, merkle_root).into_inner();
|
||||||
let mut output_key = self.clone();
|
let mut output_key = self;
|
||||||
let parity = output_key.tweak_add_assign(secp, &tweak_value).expect("Tap tweak failed");
|
let parity = output_key.tweak_add_assign(secp, &tweak_value).expect("Tap tweak failed");
|
||||||
|
|
||||||
debug_assert!(self.tweak_add_check(secp, &output_key, parity, tweak_value));
|
debug_assert!(self.tweak_add_check(secp, &output_key, parity, tweak_value));
|
||||||
|
|
Loading…
Reference in New Issue