aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Bell <bryan.w.bell@gmail.com>2015-09-21 21:15:23 -0700
committerBryan Bell <bryan.w.bell@gmail.com>2015-09-21 21:15:23 -0700
commit15af32cc2764fac566a76e22d810c39bef72acf6 (patch)
treea9249d077574f13eb0d4c763bd8d74ca0de40544
parent345a069201cf48c2feb66fd11369e5d90ec18862 (diff)
downloadservo-15af32cc2764fac566a76e22d810c39bef72acf6.tar.gz
servo-15af32cc2764fac566a76e22d810c39bef72acf6.zip
Unify two branches of match statement in intersec_ellipse_line
-rw-r--r--components/gfx/paint_context.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs
index 7f993f8ed6e..a409cd592e6 100644
--- a/components/gfx/paint_context.rs
+++ b/components/gfx/paint_context.rs
@@ -477,20 +477,13 @@ impl<'a> PaintContext<'a> {
}
(Some(p0), Some(p1))
},
- (Some(x0), None) => {
+ (Some(x0), None) | (None, Some(x0)) => {
let mut p = Point2D::new(x0, a * x0 + b) + e.origin;
if rotated_axes {
p = rotate_axes(p, false);
}
(Some(p), None)
},
- (None, Some(x1)) => {
- let mut p = Point2D::new(x1, a * x1 + b) + e.origin;
- if rotated_axes {
- p = rotate_axes(p, false);
- }
- (Some(p), None)
- },
(None, None) => (None, None),
}
}