Remove PartialOrd from Emoji because unneccessary

This commit is contained in:
bitfl0wer 2024-01-23 23:50:22 +01:00
parent a564293fef
commit f3771b31ca
4 changed files with 3 additions and 37 deletions

View File

@ -62,37 +62,3 @@ impl PartialEq for Emoji {
|| 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>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialOrd, PartialEq)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
pub struct Reaction {
pub 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 guild_id: Option<Snowflake>,
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 id: Snowflake,
pub name: String,