diff --git a/rust-bindings/rust/libostree/src/object_name.rs b/rust-bindings/rust/libostree/src/object_name.rs index 463a0606..e6494923 100644 --- a/rust-bindings/rust/libostree/src/object_name.rs +++ b/rust-bindings/rust/libostree/src/object_name.rs @@ -14,7 +14,7 @@ fn hash_object_name(v: &glib::Variant) -> u32 { unsafe { ffi::ostree_hash_object_name(v.to_glib_none().0 as glib_ffi::gconstpointer) } } -#[derive(PartialEq, Eq, Debug)] +#[derive(Eq, Debug)] pub struct ObjectName { variant: glib::Variant, checksum: String, @@ -66,3 +66,9 @@ impl Hash for ObjectName { state.write_u32(hash_object_name(&self.variant)); } } + +impl PartialEq for ObjectName { + fn eq(&self, other: &ObjectName) -> bool { + self.checksum == other.checksum && self.object_type == other.object_type + } +}