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:
Bobby Holley 2018-04-10 17:35:15 -07:00
parent f7ae1a37e3
commit c99bcdd4b8
181 changed files with 9981 additions and 7933 deletions

View file

@ -71,11 +71,11 @@ impl Bezier {
for _ in 0..NEWTON_METHOD_ITERATIONS {
let x2 = self.sample_curve_x(t);
if x2.approx_eq(x, epsilon) {
return t
return t;
}
let dx = self.sample_curve_derivative_x(t);
if dx.approx_eq(0.0, 1e-6) {
break
break;
}
t -= (x2 - x) / dx;
}
@ -84,16 +84,16 @@ impl Bezier {
let (mut lo, mut hi, mut t) = (0.0, 1.0, x);
if t < lo {
return lo
return lo;
}
if t > hi {
return hi
return hi;
}
while lo < hi {
let x2 = self.sample_curve_x(t);
if x2.approx_eq(x, epsilon) {
return t
return t;
}
if x > x2 {
lo = t
@ -124,4 +124,3 @@ impl ApproxEq for f64 {
(self - value).abs() < epsilon
}
}