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:
Tobin C. Harding 2022-05-25 13:41:22 +10:00
parent 27649ba182
commit f81d4aa9bd
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ impl TapTweak for UntweakedPublicKey {
/// The tweaked key and its 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 mut output_key = self.clone();
let mut output_key = self;
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));