From 7bb972c7b4362e7e8ca057c8ba81c5d60cce6e12 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 14 Mar 2022 13:24:54 -0500 Subject: [PATCH] Derive `Eq` and `Hash` on `Rect`. --- src/geometry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geometry.rs b/src/geometry.rs index beb8597..80c9f07 100644 --- a/src/geometry.rs +++ b/src/geometry.rs @@ -28,7 +28,7 @@ impl Point { } /// Rectangle region on the map -#[derive(PartialEq, Copy, Clone, Debug)] +#[derive(Hash, PartialEq, Eq, Copy, Clone, Debug)] pub struct Rect { pub x1: usize, pub x2: usize,