Add padding to text::Span
This commit is contained in:
parent
f7fe1edcbb
commit
2796a6bc97
4 changed files with 57 additions and 12 deletions
|
|
@ -99,6 +99,20 @@ impl<T> From<Size<T>> for Vector<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> std::ops::Add for Size<T>
|
||||
where
|
||||
T: std::ops::Add<Output = T>,
|
||||
{
|
||||
type Output = Size<T>;
|
||||
|
||||
fn add(self, rhs: Self) -> Self::Output {
|
||||
Size {
|
||||
width: self.width + rhs.width,
|
||||
height: self.height + rhs.height,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> std::ops::Sub for Size<T>
|
||||
where
|
||||
T: std::ops::Sub<Output = T>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue