refactor: derive PartialEq and Eq for all enums
This commit is contained in:
parent
f659414a9c
commit
03d1dff3a8
|
@ -9,7 +9,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
|
|||
use std::str::FromStr;
|
||||
|
||||
/// 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))]
|
||||
pub enum Clan {
|
||||
// Au Ra
|
||||
|
|
|
@ -5,7 +5,7 @@ use errors::UnknownVariant;
|
|||
use std::fmt::{Display, Formatter, Result as FmtResult};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
pub enum DataCenter {
|
||||
Aether,
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
|
|||
use std::str::FromStr;
|
||||
|
||||
/// The guardian deities in the game.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
pub enum Guardian {
|
||||
Althyk,
|
||||
|
|
|
@ -11,7 +11,7 @@ use std::str::FromStr;
|
|||
///
|
||||
/// [`Job`]: ::jobs::Job
|
||||
/// [`NonCombatJob`]: ::jobs::NonCombatJob
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
pub enum Classification {
|
||||
War,
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
|
|||
use std::str::FromStr;
|
||||
|
||||
/// 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))]
|
||||
pub enum Job {
|
||||
// DPS
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
|
|||
use std::str::FromStr;
|
||||
|
||||
/// 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))]
|
||||
pub enum NonCombatJob {
|
||||
// Gatherers
|
||||
|
|
|
@ -9,7 +9,7 @@ use std::fmt::{Display, Formatter, Result as FmtResult};
|
|||
use std::str::FromStr;
|
||||
|
||||
/// The playable races in the game.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
pub enum Race {
|
||||
AuRa,
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::str::FromStr;
|
|||
/// Each [`Job`] has a role attached to it.
|
||||
///
|
||||
/// [`Job`]: ::jobs::Job
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
pub enum Role {
|
||||
Dps,
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::str::FromStr;
|
|||
/// The worlds, sometimes called servers, in the game.
|
||||
///
|
||||
/// 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))]
|
||||
pub enum World {
|
||||
// Aether
|
||||
|
|
Loading…
Reference in New Issue