From a3be82b7ab565c655e2fbcc853ae9bc4ec70d4f3 Mon Sep 17 00:00:00 2001 From: rasul Date: Sun, 5 Apr 2020 15:14:07 -0500 Subject: [PATCH] impl PartialEq for Zone --- src/world/zone.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/world/zone.rs b/src/world/zone.rs index f5d0119..693692e 100644 --- a/src/world/zone.rs +++ b/src/world/zone.rs @@ -1,3 +1,4 @@ +use std::cmp::PartialEq; use std::collections::HashSet; use std::convert::TryFrom; use std::error::Error; @@ -29,6 +30,16 @@ impl Zone { } } +impl PartialEq for Zone { + fn eq(&self, other: &Self) -> bool { + self.id == other.id + && self.parent == other.parent + && self.name == other.name + && self.users_visible == other.users_visible + && self.areas == other.areas + } +} + impl Area for Zone { fn id(&self) -> Id { self.id