Add SubAssign for Size
This commit is contained in:
parent
0ea8899dcf
commit
d46be20d6e
|
@ -637,6 +637,14 @@ impl<N: AddAssign, Kind> AddAssign for Size<N, Kind> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<N: SubAssign, Kind> SubAssign for Size<N, Kind> {
|
||||||
|
#[inline]
|
||||||
|
fn sub_assign(&mut self, rhs: Self) {
|
||||||
|
self.w -= rhs.w;
|
||||||
|
self.h -= rhs.h
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<N: Clone, Kind> Clone for Size<N, Kind> {
|
impl<N: Clone, Kind> Clone for Size<N, Kind> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
|
|
Loading…
Reference in New Issue