mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Refactor media feature expression representation in preparation to support multi-range syntax
No behavior change. Depends on D145229 Differential Revision: https://phabricator.services.mozilla.com/D145230
This commit is contained in:
parent
990de9ceaa
commit
f545a473ff
2 changed files with 159 additions and 127 deletions
|
@ -72,6 +72,16 @@ impl ComputeSquaredDistance for Ratio {
|
|||
}
|
||||
}
|
||||
|
||||
impl Zero for Ratio {
|
||||
fn zero() -> Self {
|
||||
Self::new(Zero::zero(), One::one())
|
||||
}
|
||||
|
||||
fn is_zero(&self) -> bool {
|
||||
self.0.is_zero()
|
||||
}
|
||||
}
|
||||
|
||||
impl Ratio {
|
||||
/// Returns a new Ratio.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue