Dupe the multiple Add impls

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
This commit is contained in:
Deirdre Connolly 2020-10-05 23:26:53 -04:00 committed by Deirdre Connolly
parent 62ad554d84
commit de6994ad52
1 changed files with 1 additions and 2 deletions

View File

@ -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
}
}