Move Assign impls together

Next patch will move all the impls of `Add` and `Sub` into a macro call.
In order to make that patch smaller move the assign impls to be together
below the add/sub impls.

Code move only, no logic change.
This commit is contained in:
Tobin C. Harding 2025-03-03 13:09:10 +11:00
parent cc66838e80
commit f5e17914b6
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 4 additions and 4 deletions

View File

@ -211,10 +211,6 @@ impl ops::Add<BlockInterval> for BlockInterval {
}
}
impl ops::AddAssign<BlockInterval> for BlockInterval {
fn add_assign(&mut self, rhs: BlockInterval) { self.0 = self.to_u32() + rhs.to_u32(); }
}
// interval - interval = interval
impl ops::Sub<BlockInterval> for BlockInterval {
type Output = BlockInterval;
@ -225,6 +221,10 @@ impl ops::Sub<BlockInterval> for BlockInterval {
}
}
impl ops::AddAssign<BlockInterval> for BlockInterval {
fn add_assign(&mut self, rhs: BlockInterval) { self.0 = self.to_u32() + rhs.to_u32(); }
}
impl ops::SubAssign<BlockInterval> for BlockInterval {
fn sub_assign(&mut self, rhs: BlockInterval) { self.0 = self.to_u32() - rhs.to_u32(); }
}