Compare commits

...

2 Commits

Author SHA1 Message Date
Flori e1e6f3e51e
Merge 970f5b8b4f into fe8106d2a1 2024-01-23 23:54:34 +01:00
bitfl0wer 970f5b8b4f
Remove PartialOrd from Emoji because unneccessary 2024-01-23 23:53:08 +01:00
4 changed files with 3 additions and 37 deletions

View File

@ -62,37 +62,3 @@ impl PartialEq for Emoji {
|| self.available != other.available) || self.available != other.available)
} }
} }
impl PartialOrd for Emoji {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
match self.id.partial_cmp(&other.id) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.name.partial_cmp(&other.name) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.roles.partial_cmp(&other.roles) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.roles.partial_cmp(&other.roles) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.require_colons.partial_cmp(&other.require_colons) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.managed.partial_cmp(&other.managed) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
match self.animated.partial_cmp(&other.animated) {
Some(core::cmp::Ordering::Equal) => {}
ord => return ord,
}
self.available.partial_cmp(&other.available)
}
}

View File

@ -218,7 +218,7 @@ pub struct EmbedField {
inline: Option<bool>, inline: Option<bool>,
} }
#[derive(Debug, Clone, Serialize, Deserialize, PartialOrd, PartialEq)] #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Reaction { pub struct Reaction {
pub count: u32, pub count: u32,
pub burst_count: u32, pub burst_count: u32,

View File

@ -133,7 +133,7 @@ bitflags::bitflags! {
} }
} }
#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, PartialOrd)] #[derive(Debug, Deserialize, Serialize, Clone, PartialEq)]
pub struct UserProfileMetadata { pub struct UserProfileMetadata {
pub guild_id: Option<Snowflake>, pub guild_id: Option<Snowflake>,
pub pronouns: String, pub pronouns: String,

View File

@ -78,7 +78,7 @@ impl std::default::Default for GetUserGuildSchema {
} }
} }
#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq, PartialOrd)] #[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq)]
pub struct GuildPreview { pub struct GuildPreview {
pub id: Snowflake, pub id: Snowflake,
pub name: String, pub name: String,