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:
parent
cc66838e80
commit
f5e17914b6
|
@ -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(); }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue