refactor: derive PartialEq and Eq for all enums

This commit is contained in:
Anna 2018-09-04 16:17:44 -04:00
parent f659414a9c
commit 03d1dff3a8
9 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
/// The clans of the playable races in the game. /// The clans of the playable races in the game.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Clan { pub enum Clan {
// Au Ra // Au Ra

View File

@ -5,7 +5,7 @@ use errors::UnknownVariant;
use std::fmt::{Display, Formatter, Result as FmtResult}; use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum DataCenter { pub enum DataCenter {
Aether, Aether,

View File

@ -6,7 +6,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
/// The guardian deities in the game. /// The guardian deities in the game.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Guardian { pub enum Guardian {
Althyk, Althyk,

View File

@ -11,7 +11,7 @@ use std::str::FromStr;
/// ///
/// [`Job`]: ::jobs::Job /// [`Job`]: ::jobs::Job
/// [`NonCombatJob`]: ::jobs::NonCombatJob /// [`NonCombatJob`]: ::jobs::NonCombatJob
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Classification { pub enum Classification {
War, War,

View File

@ -10,7 +10,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
/// The Disciple of War and Disciple of Magic jobs available in the game. /// The Disciple of War and Disciple of Magic jobs available in the game.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Job { pub enum Job {
// DPS // DPS

View File

@ -8,7 +8,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
/// The Disciple of the Land and Disciple of the Hand jobs available in the game. /// The Disciple of the Land and Disciple of the Hand jobs available in the game.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum NonCombatJob { pub enum NonCombatJob {
// Gatherers // Gatherers

View File

@ -9,7 +9,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
use std::str::FromStr; use std::str::FromStr;
/// The playable races in the game. /// The playable races in the game.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Race { pub enum Race {
AuRa, AuRa,

View File

@ -10,7 +10,7 @@ use std::str::FromStr;
/// Each [`Job`] has a role attached to it. /// Each [`Job`] has a role attached to it.
/// ///
/// [`Job`]: ::jobs::Job /// [`Job`]: ::jobs::Job
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum Role { pub enum Role {
Dps, Dps,

View File

@ -10,7 +10,7 @@ use std::str::FromStr;
/// The worlds, sometimes called servers, in the game. /// The worlds, sometimes called servers, in the game.
/// ///
/// Each [`DataCenter`] has multiple worlds attached to it. /// Each [`DataCenter`] has multiple worlds attached to it.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
pub enum World { pub enum World {
// Aether // Aether