diff --git a/src/rgb/schema/schema.rs b/src/rgb/schema/schema.rs index f709ffce..72477851 100644 --- a/src/rgb/schema/schema.rs +++ b/src/rgb/schema/schema.rs @@ -45,7 +45,7 @@ sha256t_hash_newtype!( false ); -#[derive(Clone, PartialEq, Debug, Default)] +#[derive(Clone, Debug, Default)] #[cfg_attr( feature = "serde", derive(Serialize, Deserialize), @@ -90,6 +90,14 @@ impl CommitEncodeWithStrategy for Schema { type Strategy = commit_strategy::UsingStrict; } +impl PartialEq for Schema { + fn eq(&self, other: &Self) -> bool { + self.schema_id() == other.schema_id() + } +} + +impl Eq for Schema {} + mod strict_encoding { use super::*; use crate::strict_encoding::{