From de6994ad52e958b87ca4ebdfa30fc80e712f42f6 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Mon, 5 Oct 2020 23:26:53 -0400 Subject: [PATCH] Dupe the multiple Add impls Co-authored-by: Jane Lusby --- zebra-chain/src/sapling/commitment.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zebra-chain/src/sapling/commitment.rs b/zebra-chain/src/sapling/commitment.rs index a188f70c..cc099d1a 100644 --- a/zebra-chain/src/sapling/commitment.rs +++ b/zebra-chain/src/sapling/commitment.rs @@ -141,8 +141,7 @@ impl<'a> std::ops::Add<&'a ValueCommitment> for ValueCommitment { type Output = Self; fn add(self, rhs: &'a ValueCommitment) -> Self::Output { - let value = self.0.to_extended() + rhs.0.to_extended(); - ValueCommitment(value.into()) + self + *rhs } }