From d1a05401f4f104776225d455b9a0c206d9a4facc Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 20 Jul 2022 13:00:10 +1000 Subject: [PATCH] Remove redundant calls to clone Clippy emits various warnings of form: warning: redundant clone As suggested, remove the redundant calls to `clone`. --- src/util/psbt/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/psbt/mod.rs b/src/util/psbt/mod.rs index 663a6230..aa03f8ee 100644 --- a/src/util/psbt/mod.rs +++ b/src/util/psbt/mod.rs @@ -543,7 +543,7 @@ mod tests { let xpub: ExtendedPubKey = "xpub661MyMwAqRbcGoRVtwfvzZsq2VBJR1LAHfQstHUoxqDorV89vRoMxUZ27kLrraAj6MPi\ QfrDb27gigC1VS1dBXi5jGpxmMeBXEkKkcXUTg4".parse().unwrap(); - vec![(xpub, key_source.clone())].into_iter().collect() + vec![(xpub, key_source)].into_iter().collect() }, unsigned_tx: { let mut unsigned = tx.clone(); @@ -579,8 +579,8 @@ mod tests { }], outputs: vec![Output { bip32_derivation: keypaths, - proprietary: proprietary.clone(), - unknown: unknown.clone(), + proprietary: proprietary, + unknown: unknown, ..Default::default() }], };