diff --git a/gstreamer/src/miniobject.rs b/gstreamer/src/miniobject.rs index 426d9bf31..3a787b104 100644 --- a/gstreamer/src/miniobject.rs +++ b/gstreamer/src/miniobject.rs @@ -21,7 +21,6 @@ use glib::translate::{c_ptr_array_len, from_glib, from_glib_full, from_glib_none ToGlibContainerFromSlice, ToGlibPtr, ToGlibPtrMut}; use glib; -#[derive(Hash, Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct GstRc { obj: *mut T, borrowed: bool, @@ -157,6 +156,20 @@ impl Drop for GstRc { unsafe impl Sync for GstRc {} unsafe impl Send for GstRc {} +impl PartialEq for GstRc { + fn eq(&self, other: &Self) -> bool { + self.as_ref().eq(other.as_ref()) + } +} + +impl Eq for GstRc { } + +impl fmt::Debug for GstRc { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + (unsafe { &*self.obj }).fmt(f) + } +} + impl fmt::Display for GstRc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { (unsafe { &*self.obj }).fmt(f)