diff --git a/entities/Cargo.toml b/entities/Cargo.toml index 9669eae..f64ab7f 100644 --- a/entities/Cargo.toml +++ b/entities/Cargo.toml @@ -14,3 +14,4 @@ log = { version = "0.4", features = ["kv_unstable", "serde", "std", "kv_unstable serde = { version = "1", features = ["derive"] } thiserror = "1" time = { version = "0.3", features = ["parsing", "serde", "formatting"] } +static_assertions = "1" \ No newline at end of file diff --git a/entities/src/account.rs b/entities/src/account.rs index 08ee5cb..f60aad5 100644 --- a/entities/src/account.rs +++ b/entities/src/account.rs @@ -71,6 +71,18 @@ impl AccountId { } } +static_assertions::assert_not_impl_any!( + AccountId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + /// A single name: value pair from a user's profile #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Default)] pub struct MetadataField { diff --git a/entities/src/attachment.rs b/entities/src/attachment.rs index b245053..671441c 100644 --- a/entities/src/attachment.rs +++ b/entities/src/attachment.rs @@ -41,6 +41,18 @@ impl AttachmentId { } } +static_assertions::assert_not_impl_any!( + AttachmentId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + /// Information about the attachment itself. #[derive(Debug, Deserialize, Serialize, Clone, PartialEq)] pub struct Meta { diff --git a/entities/src/filter.rs b/entities/src/filter.rs index b6d88e8..b7cf727 100644 --- a/entities/src/filter.rs +++ b/entities/src/filter.rs @@ -68,6 +68,18 @@ impl FilterId { } } +static_assertions::assert_not_impl_any!( + FilterId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + /// Represents the various types of Filter contexts #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] diff --git a/entities/src/list.rs b/entities/src/list.rs index f5639f4..72a0aa2 100644 --- a/entities/src/list.rs +++ b/entities/src/list.rs @@ -23,3 +23,15 @@ impl ListId { Self(value.into()) } } + +static_assertions::assert_not_impl_any!( + ListId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); diff --git a/entities/src/mention.rs b/entities/src/mention.rs index 9a36dab..6b38b22 100644 --- a/entities/src/mention.rs +++ b/entities/src/mention.rs @@ -29,3 +29,15 @@ impl MentionId { Self(value.into()) } } + +static_assertions::assert_not_impl_any!( + Mention: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); diff --git a/entities/src/notification.rs b/entities/src/notification.rs index 45f46de..8aff456 100644 --- a/entities/src/notification.rs +++ b/entities/src/notification.rs @@ -39,6 +39,18 @@ impl NotificationId { } } +static_assertions::assert_not_impl_any!( + NotificationId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + /// The type of notification. #[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq)] #[serde(rename_all = "lowercase")] diff --git a/entities/src/push.rs b/entities/src/push.rs index 148c40d..a51ce94 100644 --- a/entities/src/push.rs +++ b/entities/src/push.rs @@ -43,6 +43,17 @@ impl SubscriptionId { } } +static_assertions::assert_not_impl_any!( + SubscriptionId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + pub mod add_subscription { use serde::Serialize; diff --git a/entities/src/relationship.rs b/entities/src/relationship.rs index d9ff7c4..83cf063 100644 --- a/entities/src/relationship.rs +++ b/entities/src/relationship.rs @@ -48,3 +48,15 @@ impl RelationshipId { Self(value.into()) } } + +static_assertions::assert_not_impl_any!( + RelationshipId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); diff --git a/entities/src/report.rs b/entities/src/report.rs index f94accc..d6450b4 100644 --- a/entities/src/report.rs +++ b/entities/src/report.rs @@ -27,3 +27,15 @@ impl ReportId { Self(value.into()) } } + +static_assertions::assert_not_impl_any!( + ReportId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); diff --git a/entities/src/status.rs b/entities/src/status.rs index 89cb1e6..b4133b0 100644 --- a/entities/src/status.rs +++ b/entities/src/status.rs @@ -82,6 +82,18 @@ impl StatusId { } } +static_assertions::assert_not_impl_any!( + StatusId: PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, + PartialEq, +); + /// A mention of another user. #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] pub struct Mention {