From 199fa07a79cbf189ff7e901c331f524f909affb5 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Fri, 20 Oct 2023 10:13:39 +0100 Subject: [PATCH] radicle: Apply clippy suggestions `cargo clippy --all --all-targets` is warning that there are multiple redundant clones. Apply the suggestions by removing the calls to `clone`. Signed-off-by: Fintan Halpenny X-Clacks-Overhead: GNU Terry Pratchett --- radicle/src/cob/identity.rs | 5 +---- radicle/src/cob/issue.rs | 2 +- radicle/src/cob/store.rs | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/radicle/src/cob/identity.rs b/radicle/src/cob/identity.rs index 3aa8a3d3..7b3cd40f 100644 --- a/radicle/src/cob/identity.rs +++ b/radicle/src/cob/identity.rs @@ -1417,10 +1417,7 @@ mod test { doc.delegate(eve.public_key()); // Update with both Bob and Alice's signature. - let revision = identity - .update("Add eve", "", &doc, &alice) - .unwrap() - .clone(); + let revision = identity.update("Add eve", "", &doc, &alice).unwrap(); identity.accept(&revision, &bob).unwrap(); // Update description again with signatures by Eve and Bob. diff --git a/radicle/src/cob/issue.rs b/radicle/src/cob/issue.rs index eb9c1c58..db980ffd 100644 --- a/radicle/src/cob/issue.rs +++ b/radicle/src/cob/issue.rs @@ -1458,7 +1458,7 @@ mod test { "Blah blah blah.", &[], &[], - [embed1.clone(), embed2.clone()], + [embed1, embed2], &node.signer, ) .unwrap(); diff --git a/radicle/src/cob/store.rs b/radicle/src/cob/store.rs index 4d5b5ff8..bc4f8ed4 100644 --- a/radicle/src/cob/store.rs +++ b/radicle/src/cob/store.rs @@ -324,8 +324,7 @@ impl, R> Transaction { { let actions = NonEmpty::from_vec(self.actions) .expect("Transaction::commit: transaction must not be empty"); - let Updated { head, object, .. } = - store.update(id, msg, actions.clone(), self.embeds, signer)?; + let Updated { head, object, .. } = store.update(id, msg, actions, self.embeds, signer)?; Ok((object.object, head)) }