Skip to content

Commit f16ab4d

Browse files
committed
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`.
1 parent 61aed29 commit f16ab4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/schnorr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl TapTweak for UntweakedPublicKey {
109109
/// The tweaked key and its parity.
110110
fn tap_tweak<C: Verification>(self, secp: &Secp256k1<C>, merkle_root: Option<TapBranchHash>) -> (TweakedPublicKey, secp256k1::Parity) {
111111
let tweak_value = TapTweakHash::from_key_and_tweak(self, merkle_root).into_inner();
112-
let mut output_key = self.clone();
112+
let mut output_key = self;
113113
let parity = output_key.tweak_add_assign(secp, &tweak_value).expect("Tap tweak failed");
114114

115115
debug_assert!(self.tweak_add_check(secp, &output_key, parity, tweak_value));

0 commit comments

Comments
 (0)