refactor: add more PartialEq implementations
This commit is contained in:
parent
3157bb2bb5
commit
c412111f13
|
@ -1,7 +1,7 @@
|
||||||
macro_rules! ffxiv_enum {
|
macro_rules! ffxiv_enum {
|
||||||
($(#[$meta:meta])* $name:ident { $($variant:ident => $str_repr:expr),+$(,)? }) => {
|
($(#[$meta:meta])* $name:ident { $($variant:ident => $str_repr:expr),+$(,)? }) => {
|
||||||
$(#[$meta])*
|
$(#[$meta])*
|
||||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Clone, Copy, Serialize, Deserialize)]
|
||||||
pub enum $name {
|
pub enum $name {
|
||||||
$($variant,)+
|
$($variant,)+
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ pub mod linkshell;
|
||||||
pub mod search;
|
pub mod search;
|
||||||
|
|
||||||
ffxiv_enum!(
|
ffxiv_enum!(
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Eq, PartialOrd, Ord)]
|
||||||
GrandCompany {
|
GrandCompany {
|
||||||
Flames => "immortal flames",
|
Flames => "immortal flames",
|
||||||
Maelstrom => "maelstrom",
|
Maelstrom => "maelstrom",
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub struct Character {
|
||||||
pub portrait: Url,
|
pub portrait: Url,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct GrandCompanyInfo {
|
pub struct GrandCompanyInfo {
|
||||||
pub name: GrandCompany,
|
pub name: GrandCompany,
|
||||||
pub rank: String,
|
pub rank: String,
|
||||||
|
@ -60,7 +60,7 @@ ffxiv_enum!(CityState {
|
||||||
});
|
});
|
||||||
|
|
||||||
ffxiv_enum!(
|
ffxiv_enum!(
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Eq, PartialOrd, Ord)]
|
||||||
Job {
|
Job {
|
||||||
Gladiator => "gladiator",
|
Gladiator => "gladiator",
|
||||||
Paladin => "paladin",
|
Paladin => "paladin",
|
||||||
|
|
Loading…
Reference in New Issue