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