mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Run rustfmt on selectors, servo_arc, and style.
This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
This commit is contained in:
parent
f7ae1a37e3
commit
c99bcdd4b8
181 changed files with 9981 additions and 7933 deletions
|
@ -15,8 +15,7 @@ use values::distance::{ComputeSquaredDistance, SquaredDistance};
|
|||
/// A computed angle.
|
||||
#[animate(fallback = "Self::animate_fallback")]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Animate, Clone, Copy, Debug, MallocSizeOf)]
|
||||
#[derive(PartialEq, PartialOrd, ToAnimatedZero, ToCss)]
|
||||
#[derive(Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, PartialOrd, ToAnimatedZero, ToCss)]
|
||||
pub enum Angle {
|
||||
/// An angle with degree unit.
|
||||
#[css(dimension)]
|
||||
|
@ -103,10 +102,7 @@ impl Zero for Angle {
|
|||
#[inline]
|
||||
fn is_zero(&self) -> bool {
|
||||
match *self {
|
||||
Angle::Deg(val) |
|
||||
Angle::Grad(val) |
|
||||
Angle::Turn(val) |
|
||||
Angle::Rad(val) => val == 0.
|
||||
Angle::Deg(val) | Angle::Grad(val) | Angle::Turn(val) | Angle::Rad(val) => val == 0.,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +112,7 @@ impl ComputeSquaredDistance for Angle {
|
|||
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
|
||||
// Use the formula for calculating the distance between angles defined in SVG:
|
||||
// https://www.w3.org/TR/SVG/animate.html#complexDistances
|
||||
self.radians64().compute_squared_distance(&other.radians64())
|
||||
self.radians64()
|
||||
.compute_squared_distance(&other.radians64())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue