From f07a0032eb9801812e101ef317a9b9f63f8fc27c Mon Sep 17 00:00:00 2001 From: Kevin Hamacher Date: Thu, 20 Feb 2020 20:13:36 +0100 Subject: [PATCH] Remove old unnecessary cmp hack --- src/display.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/display.rs b/src/display.rs index 9147dfb..bb9f2f8 100644 --- a/src/display.rs +++ b/src/display.rs @@ -728,16 +728,7 @@ impl Display { // This is the non-CGB priority. // Smaller x coord = higher. - use std::cmp; - queue.sort_by(|x, y| { - if x.x > y.x { - cmp::Ordering::Greater - } else if x.x < y.x { - cmp::Ordering::Less - } else { - cmp::Ordering::Equal - } - }); + queue.sort_by(|x, y| x.x.cmp(&y.x)); queue.reverse(); // Render background