From 9c55808cc437c71bec75b816bc910e6e0bda222a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 24 Mar 2025 09:34:32 +0200 Subject: [PATCH] allocator: Implement PartialEq and Eq for AllocationParams Part-of: --- gstreamer/src/allocation_params.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gstreamer/src/allocation_params.rs b/gstreamer/src/allocation_params.rs index df11c0f69..fe6730769 100644 --- a/gstreamer/src/allocation_params.rs +++ b/gstreamer/src/allocation_params.rs @@ -98,6 +98,17 @@ impl From for AllocationParams { } } +impl PartialEq for AllocationParams { + fn eq(&self, other: &Self) -> bool { + self.flags() == other.flags() + && self.align() == other.align() + && self.prefix() == other.prefix() + && self.padding() == other.padding() + } +} + +impl Eq for AllocationParams {} + #[doc(hidden)] impl<'a> ToGlibPtr<'a, *const ffi::GstAllocationParams> for AllocationParams { type Storage = PhantomData<&'a Self>;