From 15af32cc2764fac566a76e22d810c39bef72acf6 Mon Sep 17 00:00:00 2001 From: Bryan Bell Date: Mon, 21 Sep 2015 21:15:23 -0700 Subject: [PATCH] Unify two branches of match statement in intersec_ellipse_line --- components/gfx/paint_context.rs | 9 +-------- 1 file changed, 1 insertion(+), 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), } }