Use generics for text spacing properties

This commit is contained in:
Anthony Ramine 2017-05-31 14:12:28 +02:00
parent 5c6987a50d
commit 2c7fbb4b4c
10 changed files with 155 additions and 175 deletions

View file

@ -222,6 +222,13 @@ pub enum LengthOrPercentage {
Calc(CalcLengthOrPercentage),
}
impl From<Au> for LengthOrPercentage {
#[inline]
fn from(length: Au) -> Self {
LengthOrPercentage::Length(length)
}
}
impl LengthOrPercentage {
#[inline]
#[allow(missing_docs)]