mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-04-15 16:48:10 -04: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 {
|
impl ops::Add for Duration {
|
||||||
type Output = Duration;
|
type Output = Duration;
|
||||||
fn add(self, rhs: Duration) -> Duration {
|
fn add(self, rhs: Duration) -> Duration {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user