mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-02-23 19:42:30 -05:00
support negating Durations
This commit is contained in:
parent
d99cab5f27
commit
c53250c0c5
@ -304,6 +304,13 @@ impl ops::Mul<i64> for Duration {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Neg for Duration {
|
||||
type Output = Self;
|
||||
fn neg(self) -> Self::Output {
|
||||
Duration(-self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Add for Duration {
|
||||
type Output = Duration;
|
||||
fn add(self, rhs: Duration) -> Duration {
|
||||
|
Loading…
x
Reference in New Issue
Block a user