impl PartialEq for Zone

master
rasul 5 years ago
parent 57ccd45420
commit a3be82b7ab

@ -1,3 +1,4 @@
use std::cmp::PartialEq;
use std::collections::HashSet; use std::collections::HashSet;
use std::convert::TryFrom; use std::convert::TryFrom;
use std::error::Error; 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 { impl Area for Zone {
fn id(&self) -> Id { fn id(&self) -> Id {
self.id self.id

Loading…
Cancel
Save