Impl<'a> Sub<&'a ValueCommitment> for ValueCommitment

This commit is contained in:
Deirdre Connolly 2020-10-05 23:28:32 -04:00 committed by Deirdre Connolly
parent de6994ad52
commit cc44711204
1 changed files with 8 additions and 0 deletions

View File

@ -187,6 +187,14 @@ impl From<ValueCommitment> for [u8; 32] {
}
}
impl<'a> std::ops::Sub<&'a ValueCommitment> for ValueCommitment {
type Output = Self;
fn sub(self, rhs: &'a ValueCommitment) -> Self::Output {
self - *rhs
}
}
impl std::ops::Sub<ValueCommitment> for ValueCommitment {
type Output = Self;