mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Use generics for text spacing properties
This commit is contained in:
parent
5c6987a50d
commit
2c7fbb4b4c
10 changed files with 155 additions and 175 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue