diff --git a/units/src/amount.rs b/units/src/amount.rs index 92f6ef76..87369d02 100644 --- a/units/src/amount.rs +++ b/units/src/amount.rs @@ -1328,6 +1328,12 @@ impl ops::DivAssign for SignedAmount { fn div_assign(&mut self, rhs: i64) { *self = *self / rhs } } +impl ops::Neg for SignedAmount { + type Output = Self; + + fn neg(self) -> Self::Output { Self(self.0.neg()) } +} + impl FromStr for SignedAmount { type Err = ParseError;